Mark group-level labels in Label API as such.
Problem to solve
When using the label API for project-labels, also group-level labels are reported. It's nice to see all labels as a union from groups and from the project, but label objects should be marked as such in the API's JSON answer.
Solution:
- Add an additional property to the JSON answer, so project- and group-level labels can be distinguished.
- It should be possible to filter project labels for project-labels only.
Target audience
GitLab API users.
Further details
Currently, there is no way to have label templates, so an external script is needed to mass-upload or mass-edit labels in projects and groups (see #44901 (closed)).
Proposal
Solution 1:
- Add an additional key-value pair to distinguish project- from group-labels.
I suggestkind
as a key name and the values:project-label
group-label
Solution 2:
- Add a
is_project_label
property to reach label object in the JSON answer.
Enhancement:
Maybe the origin of a group-level label is of interest too. So you could add a group_label_origin
.
What does success look like, and how can we measure that?
Links / references
Related issues:
Edited by Patrick Lehmann