Issue template for organization does not work

Hello.

I try to create issue templates for my organization’s projects in accordance with the article “Creating a default community health file for your organization”.

  1. I created a public repository called “.github”.

  2. Then I created a directory called “ISSUE_TEMPLATE” in the root of the repository.

  3. Then I created files “bug_report.md” and “feature_request.md” and placed them in the directory “ISSUE_TEMPLATE”.

  4. After that, I tried to create an issue with the button “New issue” in another organization’s repository.

I expected to see the next page:

Instead, I see the next page:

Tell me please, did I do something wrong? Or maybe is it a bug?

2 Likes

Hi @nikolaas ,

No, you didn’t do anything wrong. Extending default issue/PR templates across an account or organization is not (yet) supported according to the document you linked yourself.

@mpboom, thank you for the reply.

But I am confused. The article says in the start:

You can create default community health files, such as CONTRIBUTING and CODE_OF_CONDUCT, for your organization. Default files will be used for any public repository in your organization that does not contain its own file of that type.

Then it says in the section “Supported file types”:

You can create organization-wide defaults for the following community health files:

 

Issue and pull request templates Issue and pull request templates customize and standardize the information you'd like contributors to include when they open issues and pull requests in your repository. For more information, see "About issue and pull request templates."

 

You cannot create a default license file for your organization.

My understanding, GitHub does not support the file “LICENSE” as default community health files for an organization. But files with the rest types including issue/PR templates are supported.

Why do you say that extending default issue/PR templates across an organization is not supported according to the article?

Ouch, I seem to have misread the article a bit… I’m sorry - you indeed seem to be right.

However in your original post you seem to be opening an issue in a project that isn’t yours. These things only work for projects within your own organization. So I suppose that is a reason why it still doesn’t work.

This is a repository with community health files: https://github.com/i-core/.github.

This is a repository in which I want to create an issue: https://github.com/i-core/reqlog.

Both repositories belong to the organization https://github.com/i-core. But I can’t use the default issue template that is placed in the repository “.github” when I create an issue in the repository “reqlog”.

We also experienced this issue.

We resolved it by placing the ISSUE_TEMPLATE directory underneath a .github  directory of the .github  repository in the organization, e.g myorg/.github/.github/ISSUE_TEMPLATE/bug_report.md. This does cause other repos in the same org to use those configured templates.

It’s an extra level of .github versus what the documentation says (emphasis added):

You can add default community health files for your organization to the root of a public repository called .github that is owned by the organization.

7 Likes

Thanks a lot for taking the effort to answer the question @aiwebb ! @nikolaas , does that help out? If so, give @aiwebb some kudos and mark his solution as the accepted solution!

@aiwebb, thanks for your help.

I moved the directory ISSUE_TEMPLATE  underneath the  .github  directory of the  .github  repository. After that, the issue templates started working.

I tried to move the directory PULL_REQUEST_TEMPLATE to the directory .github but it does not help out. Since my directory PULL_REQUEST_TEMPLATE contains only a file pull_request_template.md I renamed the file to PULL_REQUEST_TEMPLATE.md and moved it directly to the directory .github. After that, the default pull request template started working.

@mpboom, thank you as well. I think it would be nice to align the documentation and the implementation of this feature.

Great it worked! I agree that the documentation should be aligned, but am not affiliated with GitHub myself. I’ve alerted one of the Community Moderators; they’ll probably be in touch soon with the documentation team.

Hi everyone!

Thanks for letting us know about this confusing part of the documentation. I’ve passed on your feedback to our documentation team.

Thanks!

1 Like

Hello @that-pat ,

I wanted to inquire what the state of this is, since in the documentation it is still stated that the path

.github/PULL_REQUEST_TEMPLATE/some_pull_request_template.md

should be valid. However, it is not working for our project and in several forums I have found online as well.

Hi @neubs-bsi,

I see that you have a Pull Request template set up on this project that is working, but it’s using the single pull request template format instead of the one for multiple formats. Do you have an example where this is still not working so that I can reproduce the issue in its current state?

Thanks! 

Hello @that-pat ,

thanks for taking my post into consideration.

I have created a dummy project, that attempts to use two pull request templates:

https://github.com/neubs-bsi/pullRequestTemplateDummyProject

The file structure is as promoted in the documentation and I have created a pull request testing the feature:

https://github.com/neubs-bsi/pullRequestTemplateDummyProject/pull/1

No template appeared.

Hi @neubs-bsi,

How did you create the pull request? Unlike with issue templates, there is a special link you would use to activate a pull request template.

https://github.com/ <owner> / <repository> /compare/master… <branch-name>?quick_pull=1&template= <template_file>

Thanks!

1 Like

Hello @that-pat ,

you are right. That did in fact work. Thanks for the help.

For other people having this issue it might be worth putting this explicitly into the documentation of the pull request templates, to make it easier to understand.

Additionally, if there would be an option for choosing a template when creating a pull request via the interface button in github, I would find that very helpful. This could be implemented similarly to the way the choice of the issue templates is implemented.

Kind regards :slight_smile:

1 Like

Hi @that-pat!

I seem to have the same problem of not being able to configure the default issue templates. To me my repositories look identical to other user’s where the feature is working. Can you by taking a quick glanze see what I am missing? I feel so stupid.

Default repository: https://github.com/FantasticFiasco/.github

Respoitory where issue templates aren’t working: https://github.com/FantasticFiasco/temp

Thanks!

Oh, perhaps it hasn’t been implemented: https://github.community/t5/How-to-use-Git-and-GitHub/Default-community-files-ignores-issue-templates/m-p/43809

My issue was similar. I think it was occurring because my_repo inside the organization was private. Once it was made public it started working.