diff options
-rw-r--r-- | changelogs/unreleased/56694-mark-group-level-labels-in-label-api-as-such.yml | 5 | ||||
-rw-r--r-- | lib/api/entities.rb | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/changelogs/unreleased/56694-mark-group-level-labels-in-label-api-as-such.yml b/changelogs/unreleased/56694-mark-group-level-labels-in-label-api-as-such.yml new file mode 100644 index 00000000000..ae2d9e18e0b --- /dev/null +++ b/changelogs/unreleased/56694-mark-group-level-labels-in-label-api-as-such.yml @@ -0,0 +1,5 @@ +--- +title: 'API: Indicate if label is a project label' +merge_request: 25219 +author: Robert Schilling +type: added diff --git a/lib/api/entities.rb b/lib/api/entities.rb index beb8ce349b4..4fa501d087f 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -1031,6 +1031,9 @@ module API expose :priority do |label, options| label.priority(options[:parent]) end + expose :is_project_label do |label, options| + label.is_a?(::ProjectLabel) + end end class List < Grape::Entity |