summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2019-02-07 09:48:04 +0000
committerSean McGivern <sean@gitlab.com>2019-02-07 09:48:04 +0000
commitd91b96458e59345dd9ad5b9e3d03a12db6c78270 (patch)
tree09e0630be1a56e7b63b84b783aa754b228803656 /lib/api/helpers.rb
parent6e51960788f8a431f86b169d648c4cba68c717ae (diff)
parent7c6efc001f90ff07c0d48e81409dc5ecd3739b25 (diff)
downloadgitlab-ce-d91b96458e59345dd9ad5b9e3d03a12db6c78270.tar.gz
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/helpers.rb')
-rw-r--r--lib/api/helpers.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index e3d0b981065..2eb7b04711a 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -84,8 +84,8 @@ module API
page || not_found!('Wiki Page')
end
- def available_labels_for(label_parent)
- search_params = { include_ancestor_groups: true }
+ def available_labels_for(label_parent, include_ancestor_groups: true)
+ search_params = { include_ancestor_groups: include_ancestor_groups }
if label_parent.is_a?(Project)
search_params[:project_id] = label_parent.id
@@ -170,13 +170,6 @@ module API
end
end
- def find_project_label(id)
- labels = available_labels_for(user_project)
- label = labels.find_by_id(id) || labels.find_by_title(id)
-
- label || not_found!('Label')
- end
-
# rubocop: disable CodeReuse/ActiveRecord
def find_project_issue(iid)
IssuesFinder.new(current_user, project_id: user_project.id).find_by!(iid: iid)