summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMario de la Ossa <mariodelaossa@gmail.com>2018-06-15 16:05:24 -0600
committerAlexandru Croitor <acroitor@gitlab.com>2019-03-06 12:56:29 +0200
commitee8cb2d1b37c5c0d990a35af29be2877092eef29 (patch)
treed43ebcff7e8c24dd31ed3f437ca5c69c8553e51c /lib
parentc19c5197e1307e12966da86f13744009b03fcea4 (diff)
downloadgitlab-ce-ee8cb2d1b37c5c0d990a35af29be2877092eef29.tar.gz
PUT MergeRequest API endpoint - accept labels as an array
Diffstat (limited to 'lib')
-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 44f1e81caf2..2e794076a43 100644
--- a/lib/api/merge_requests.rb
+++ b/lib/api/merge_requests.rb
@@ -179,8 +179,8 @@ module API
optional :description, type: String, desc: 'The description of the merge request'
optional :assignee_id, type: Integer, desc: 'The ID of a user to assign the merge request'
optional :milestone_id, type: Integer, desc: 'The ID of a milestone to assign the merge request'
- optional :labels, type: String, desc: 'Comma-separated list of label names'
- optional :remove_source_branch, type: Boolean, desc: 'Delete source branch when merging'
+ optional :labels, type: String, coerce_with: ->(val) { val.is_a?(Array) ? val.join(', ') : val }, desc: 'Comma-separated list of label names'
+ optional :remove_source_branch, type: Boolean, desc: 'Remove source branch when merging'
optional :allow_collaboration, type: Boolean, desc: 'Allow commits from members who can merge to the target branch'
optional :allow_maintainer_to_push, type: Boolean, as: :allow_collaboration, desc: '[deprecated] See allow_collaboration'
optional :squash, type: Grape::API::Boolean, desc: 'When true, the commits will be squashed into a single commit on merge'