diff options
Diffstat (limited to 'lib/api/user_counts.rb')
-rw-r--r-- | lib/api/user_counts.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/api/user_counts.rb b/lib/api/user_counts.rb index 634dd0f2179..e5dfac3b1a1 100644 --- a/lib/api/user_counts.rb +++ b/lib/api/user_counts.rb @@ -11,13 +11,19 @@ module API get do unauthorized! unless current_user - { + counts = { merge_requests: current_user.assigned_open_merge_requests_count, # @deprecated assigned_issues: current_user.assigned_open_issues_count, assigned_merge_requests: current_user.assigned_open_merge_requests_count, review_requested_merge_requests: current_user.review_requested_open_merge_requests_count, todos: current_user.todos_pending_count } + + if Feature.enabled?(:mr_attention_requests, default_enabled: :yaml) + counts[:attention_requests] = current_user.attention_requested_open_merge_requests_count + end + + counts end end end |