Set default issue labels via issue description template when used by guest user
Problem to solve
Allow issue description templates to set the default set of labels an issue is opened with.
Intended users
Project maintainers
Further details
Often open source projects have a few types of issues, each with their own issue description template and distinguished by a label.
For instance, the GHC deployment (gitlab-ce#55039) has:
- Bugs, with an issue template and distinguished by the
bug
label - Feature requests, with an issue template and distinguished by the
feature request
label
Ideally the issue template would contain /label
commands to apply the appropriate labels. However, such commands have no effect on issues opened by guest users, who lack the necessary privileges to manage labels. Consequently these labels must currently be applied manually by the ticket triagers.
Proposal
The issue description template be extended to include a header (e.g. using the common YAML header syntax). To this a default_labels
field can be added, specifying the default labels to be a applied to an issue created with the template.
For instance, the bug.md
template might look like:
---
default_labels:
- "needs triage"
- bug
---
# Summary
Write a brief description of the issue.
# Steps to reproduce
Please provide a set of concrete steps to reproduce the issue.
...
Permissions and Security
Only committers can edit issue templates and consequently allowing this sort of access to labels to unprivileged users should be safe.
Documentation
The header format would need to be documented.
What does success look like, and how can we measure that?
Triage effort is reduced.