summaryrefslogtreecommitdiff
path: root/lib/api/merge_requests.rb
diff options
context:
space:
mode:
authorMario de la Ossa <mariodelaossa@gmail.com>2018-06-15 16:05:24 -0600
committerMario de la Ossa <mariodelaossa@gmail.com>2018-06-15 16:05:24 -0600
commit609324e157480fb2b489d77a530c205eb5b5dce4 (patch)
treecdd8cbe995a81822b22ed177e8614d1b0405f37a /lib/api/merge_requests.rb
parentedfa2e3fb673412272e8bc9cdbfa2e3a86a9f21f (diff)
downloadgitlab-ce-api-mr-put-labels.tar.gz
PUT MergeRequest API endpoint - accept labels as an arrayapi-mr-put-labels
Diffstat (limited to 'lib/api/merge_requests.rb')
-rw-r--r--lib/api/merge_requests.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb
index af7d2471b34..8b47f3a8fb8 100644
--- a/lib/api/merge_requests.rb
+++ b/lib/api/merge_requests.rb
@@ -160,7 +160,7 @@ 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 :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'