summaryrefslogtreecommitdiff
path: root/lib/api/labels.rb
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2019-08-06 17:27:46 +0100
committerSean McGivern <sean@gitlab.com>2019-08-08 17:10:41 +0100
commite6dc5168b86d613e3334fa55618e394308bf55bf (patch)
tree6ad67848dfbe81949474e20f5224edf055c273cb /lib/api/labels.rb
parent26087322713e2949f2bf207798512374757a484c (diff)
downloadgitlab-ce-e6dc5168b86d613e3334fa55618e394308bf55bf.tar.gz
Remove label issue and MR counts from default API responsesspeed-up-labels-api
These counts significantly increase the load time for these requests. Users can now opt in to receiving the counts by setting `with_counts=true` in requests. This is a breaking change, but hopefully a fairly minor one.
Diffstat (limited to 'lib/api/labels.rb')
-rw-r--r--lib/api/labels.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/labels.rb b/lib/api/labels.rb
index d729d3ee625..c183198d3c6 100644
--- a/lib/api/labels.rb
+++ b/lib/api/labels.rb
@@ -15,6 +15,8 @@ module API
success Entities::ProjectLabel
end
params do
+ optional :with_counts, type: Boolean, default: false,
+ desc: 'Include issue and merge request counts'
use :pagination
end
get ':id/labels' do