From e6dc5168b86d613e3334fa55618e394308bf55bf Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Tue, 6 Aug 2019 17:27:46 +0100 Subject: Remove label issue and MR counts from default API responses 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. --- lib/api/labels.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/api/labels.rb') 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 -- cgit v1.2.1