summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-03 18:41:46 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-19 14:58:25 -0200
commit7e11ca86fdb23c967c25b19735770f99f936b32c (patch)
treeefc1d9d236c9dc7bdea9e0514811da289618f1aa /lib/api
parent3db2261005c438faad8bf4a339d46eb7798f05b5 (diff)
downloadgitlab-ce-7e11ca86fdb23c967c25b19735770f99f936b32c.tar.gz
Reuse LabelsFinder on Issueable#add_labels_by_names
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/merge_requests.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb
index 2b685621da9..67fdd0be927 100644
--- a/lib/api/merge_requests.rb
+++ b/lib/api/merge_requests.rb
@@ -91,7 +91,7 @@ module API
if merge_request.valid?
# Find or create labels and attach to issue
if params[:labels].present?
- merge_request.add_labels_by_names(params[:labels].split(","))
+ merge_request.add_labels_by_names(params[:labels].split(","), current_user)
end
present merge_request, with: Entities::MergeRequest, current_user: current_user
@@ -201,7 +201,7 @@ module API
# Find or create labels and attach to issue
unless params[:labels].nil?
merge_request.remove_labels
- merge_request.add_labels_by_names(params[:labels].split(","))
+ merge_request.add_labels_by_names(params[:labels].split(","), current_user)
end
present merge_request, with: Entities::MergeRequest, current_user: current_user