diff options
author | Sean McGivern <sean@gitlab.com> | 2019-02-07 12:48:04 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-02-07 12:48:04 +0300 |
commit | d91b96458e59345dd9ad5b9e3d03a12db6c78270 (patch) | |
tree | 09e0630be1a56e7b63b84b783aa754b228803656 /lib/api/entities.rb | |
parent | 6e51960788f8a431f86b169d648c4cba68c717ae (diff) | |
parent | 7c6efc001f90ff07c0d48e81409dc5ecd3739b25 (diff) |
Merge branch 'api-group-labels' into 'master'
API group labels
Closes #44901
See merge request gitlab-org/gitlab-ce!21368
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index a1f0efa3c68..beb8ce349b4 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -1019,12 +1019,17 @@ module API label.open_merge_requests_count(options[:current_user]) end - expose :priority do |label, options| - label.priority(options[:project]) + expose :subscribed do |label, options| + label.subscribed?(options[:current_user], options[:parent]) end + end - expose :subscribed do |label, options| - label.subscribed?(options[:current_user], options[:project]) + class GroupLabel < Label + end + + class ProjectLabel < Label + expose :priority do |label, options| + label.priority(options[:parent]) end end |