summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2019-02-13 21:50:45 +0100
committerRobert Schilling <rschilling@student.tugraz.at>2019-02-13 21:50:45 +0100
commit1809f6f631c79a6dac8373782c4931393edcc7ff (patch)
treeb299f4487c42f5f427e456fe57bf2708d99c555d
parent7a8f8714cc65b36b8dbc4fe180eeb73aa2eeba0f (diff)
downloadgitlab-ce-1809f6f631c79a6dac8373782c4931393edcc7ff.tar.gz
API: Indicate if label is a project label
-rw-r--r--changelogs/unreleased/56694-mark-group-level-labels-in-label-api-as-such.yml5
-rw-r--r--lib/api/entities.rb3
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