Label ID missing from API, needed for Notes
Summary
The Label API does not expose the label id, which is desired/required for client functionality. In particular, the label ID is exposed via the Notes API in terms of body: "Added ~666 label"
. Please expose label ID in the Label API to allow lookup.
Steps to reproduce
GET /projects/:id/issues/:issue_id/notes
GET /projects/:id/labels
Expected behavior
Response from step (2) includes label id.
[
{
"id": 666, # <<<<<<<< need this
"name" : "bug",
"color" : "#d9534f",
"description": "Bug reported by user",
"open_issues_count": 1,
"closed_issues_count": 0,
"open_merge_requests_count": 1
}
]
Actual behavior
No ID.
Results of GitLab environment info
Using GitLab.com.
Possible fixes
Is it sufficient to just add :id
to here:
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/api/entities.rb#L438