Commit 8cb41f19 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'api-labels-info' into 'master'

API: Expose open_issues_count, closed_issues_count, open_merge_requests_count on labels

Partly fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/13238

See merge request !3569
parents 0913204f 5083e5b6
......@@ -19,6 +19,7 @@ v 8.7.0 (unreleased)
- Add endpoints to archive or unarchive a project !3372
- Add links to CI setup documentation from project settings and builds pages
- Handle nil descriptions in Slack issue messages (Stan Hu)
- API: Expose open_issues_count, closed_issues_count, open_merge_requests_count for labels (Robert Schilling)
- Add default scope to projects to exclude projects pending deletion
- Ensure empty recipients are rejected in BuildsEmailService
- API: Ability to filter milestones by state `active` and `closed` (Robert Schilling)
......
......@@ -23,42 +23,42 @@ Example response:
{
"name" : "bug",
"color" : "#d9534f",
"description": "Bug reported by user"
"description": "Bug reported by user",
"open_issues_count": 1,
"closed_issues_count": 0,
"open_merge_requests_count": 1
},
{
"color" : "#d9534f",
"name" : "confirmed",
"description": "Confirmed issue"
"description": "Confirmed issue",
"open_issues_count": 2,
"closed_issues_count": 5,
"open_merge_requests_count": 0
},
{
"name" : "critical",
"color" : "#d9534f",
"description": "Criticalissue. Need fix ASAP"
},
{
"color" : "#428bca",
"name" : "discussion",
"description": "Issue that needs further discussion"
"description": "Criticalissue. Need fix ASAP",
"open_issues_count": 1,
"closed_issues_count": 3,
"open_merge_requests_count": 1
},
{
"name" : "documentation",
"color" : "#f0ad4e",
"description": "Issue about documentation"
"description": "Issue about documentation",
"open_issues_count": 1,
"closed_issues_count": 0,
"open_merge_requests_count": 2
},
{
"color" : "#5cb85c",
"name" : "enhancement",
"description": "Enhancement proposal"
},
{
"color" : "#428bca",
"name" : "suggestion",
"description": "Suggestion"
},
{
"color" : "#f0ad4e",
"name" : "support",
"description": "Support issue"
"description": "Enhancement proposal",
"open_issues_count": 1,
"closed_issues_count": 0,
"open_merge_requests_count": 1
}
]
```
......
......@@ -301,6 +301,7 @@ module API
class Label < Grape::Entity
expose :name, :color, :description
expose :open_issues_count, :closed_issues_count, :open_merge_requests_count
end
class Compare < Grape::Entity
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment