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) ...@@ -19,6 +19,7 @@ v 8.7.0 (unreleased)
- Add endpoints to archive or unarchive a project !3372 - Add endpoints to archive or unarchive a project !3372
- Add links to CI setup documentation from project settings and builds pages - Add links to CI setup documentation from project settings and builds pages
- Handle nil descriptions in Slack issue messages (Stan Hu) - 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 - Add default scope to projects to exclude projects pending deletion
- Ensure empty recipients are rejected in BuildsEmailService - Ensure empty recipients are rejected in BuildsEmailService
- API: Ability to filter milestones by state `active` and `closed` (Robert Schilling) - API: Ability to filter milestones by state `active` and `closed` (Robert Schilling)
......
...@@ -23,42 +23,42 @@ Example response: ...@@ -23,42 +23,42 @@ Example response:
{ {
"name" : "bug", "name" : "bug",
"color" : "#d9534f", "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", "color" : "#d9534f",
"name" : "confirmed", "name" : "confirmed",
"description": "Confirmed issue" "description": "Confirmed issue",
"open_issues_count": 2,
"closed_issues_count": 5,
"open_merge_requests_count": 0
}, },
{ {
"name" : "critical", "name" : "critical",
"color" : "#d9534f", "color" : "#d9534f",
"description": "Criticalissue. Need fix ASAP" "description": "Criticalissue. Need fix ASAP",
}, "open_issues_count": 1,
{ "closed_issues_count": 3,
"color" : "#428bca", "open_merge_requests_count": 1
"name" : "discussion",
"description": "Issue that needs further discussion"
}, },
{ {
"name" : "documentation", "name" : "documentation",
"color" : "#f0ad4e", "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", "color" : "#5cb85c",
"name" : "enhancement", "name" : "enhancement",
"description": "Enhancement proposal" "description": "Enhancement proposal",
}, "open_issues_count": 1,
{ "closed_issues_count": 0,
"color" : "#428bca", "open_merge_requests_count": 1
"name" : "suggestion",
"description": "Suggestion"
},
{
"color" : "#f0ad4e",
"name" : "support",
"description": "Support issue"
} }
] ]
``` ```
......
...@@ -301,6 +301,7 @@ module API ...@@ -301,6 +301,7 @@ module API
class Label < Grape::Entity class Label < Grape::Entity
expose :name, :color, :description expose :name, :color, :description
expose :open_issues_count, :closed_issues_count, :open_merge_requests_count
end end
class Compare < Grape::Entity 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