Organization issue template and .github labels vs local repo labels

Hi,

In an attempt at setting up default issue templates for a whole organization, I created the required files in a .github repository. The templates are correctly presented when creating an issue in another repo, but there is an issue with labels.

Note that the templates have a couple of labels sets (bug vs enhancement, need triage) and that both the .github repo and the repo in which I’m creating an issue have said labels configured.

The trouble is that new issues bear the labels of the .github repo : clicking on the label within the issue UI takes me to a search result with 0 open issues, because it covers the wrong repository. Clicking on the labels dropdown for the issue lets me select need triage and bug again, as if these labels were not set on the issue already (they’re not really, since it is a different repo’s label that is actually set).

Similarly, if I go to the specific repo’s issues list and I try to filter by need-triage label, nothing pops up.

Is that a known issue? Should the labels in .github be eliminated in order to let new issues correctly pick up their home repo’s labels from the template?

I haven’t heard of this behavior before. Do you have a public set of repositories where you can demonstrate the bug?

@lee-dohm I had the issue template(s) in the .github repo of the reactor organization, a repo which also had the common set of labels - including those that were configured as default in the templates.

But I have since removed said labels from the .github repo and that seem to have temporarily fixed the issue.

Let me see if I can reproduce that bug on another less user-facing org.

@lee-dohm  I cannot reproduce the bug after trying the two following approaches:

 - created the .github and a new label foo, created a template that uses foo, created the foo label in an existing repository, created an issue using global template foo: the issue seem correctly linked to the current repo’s label

 - created a new label bar in the root repo, along with second global template that uses it, renamed the specific repo’s foo label to bar, created an issue using the new bar global template: similarly, correctly links the issue to the local label :frowning:

It’s either a more complicated condition for the bug to occur (pre-existing labels with associated issues, maybe? or renaming of base labels created by github?), or the bug has since been fixed.

Thanks for following up. I’ll see if I can reproduce it on my end too. Let me know if you come up with any more details I can share with the development team.

Thanks for letting us know!

@lee-dohmjust discovered another caveat of labels in templates: seems like when a user who doesn’t have permissions to set labels opens an issue, the labels in the template get completely ignored.

my main hope for labels in issue templates was to automatically put a for/triage label on new issues, as well as correctly dispatch between bug and enhancement labels with 2 distinct labels :’(

I was unable to replicate the behavior it sounds like you’re describing. I have a test repository that I use to verify things. And in that repository I was able to use a test account to create issues from a template that contains labels. Those lables were added to the new issue automatically, even when the issue was opened by an account that does not have access to set labels on issues itself.

Can you give exact steps you have to reproduce the problem you’re describing?

sure. I noticed that new issues submitted to https://github.com/reactor/reactor-core still didn’t have labels, except when submitted by a maintainer.

I was able to confirm with a secondary account that creating an issue in that repo, using one of the two organization-level templates, didn’t produce a pre-labelled issue. the templates are in the https://github.com/reactor/.github repository.

@lee-dohmit just occurred to me: were you attempting to reproduce the issue with a template that is stored in the .github repository rather than the actual repository in which you’re opening the issue?

that is my case:

  •  the .github repo defines the templates, which reference labels
  • these labels don’t exist in the .github repo (workaround for the original issue, I suffixed them with (DEMO) in here)
  • these labels DO exist in the reactor-core repo

As a maintainer, when I open an issue in reactor-core, I correctly see the two labels for the template, pre-selected. Once submitted, the issue does bear the labels.

As a test user with no rights, when I open an issue in reactor-core, I don’t see any UI related to labels (since I don’t have the rights). Furthermore, once submitted, the issue doesn’t bear any label…

I was hoping I could use this template feature to correctly type new issues and group them under a “need-triage” label to keep track of the ones that nobody on the team have yet looked at, but this doesn’t work :frowning: