summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2019-01-06 18:56:02 +0100
committerRobert Schilling <rschilling@student.tugraz.at>2019-01-31 13:49:51 +0100
commita9fdc3118a7f9fb55b6f6b243f7bed2abe1ce48f (patch)
tree92dace891ba5dd38a0d979c8146bd61d32d71fe9 /lib/api/helpers.rb
parent4e9aa7e2c042030cea190a1e57dee76de0e573ea (diff)
downloadgitlab-ce-a9fdc3118a7f9fb55b6f6b243f7bed2abe1ce48f.tar.gz
Incorporate feedback from Robert
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index afe0437c555..f769a5f78c0 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -84,7 +84,7 @@ module API
page || not_found!('Wiki Page')
end
- def available_labels_for(label_parent, 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)
@@ -170,8 +170,8 @@ module API
end
end
- def find_label(parent, id, include_ancestor_groups = true)
- labels = available_labels_for(parent, include_ancestor_groups)
+ def find_label(parent, id, include_ancestor_groups: true)
+ labels = available_labels_for(parent, include_ancestor_groups: include_ancestor_groups)
label = labels.find_by_id(id) || labels.find_by_title(id)
label || not_found!('Label')