diff options
author | Nick Thomas <nick@gitlab.com> | 2019-02-25 13:59:17 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-02-25 14:09:48 +0000 |
commit | c85a768ca5d8c53b7770fdc4dc8f9eeef237b8c8 (patch) | |
tree | ac87d4bb3eac28cdb8a498ff9d40a405651e9a39 /lib/api/merge_requests.rb | |
parent | d93d799bde3ee8082c1fd04387bd9bf0979a212d (diff) | |
download | gitlab-ce-c85a768ca5d8c53b7770fdc4dc8f9eeef237b8c8.tar.gz |
Respect the should_remove_source_branch parameter to the merge API
Diffstat (limited to 'lib/api/merge_requests.rb')
-rw-r--r-- | lib/api/merge_requests.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb index f8d2ba49d2f..03f6684226f 100644 --- a/lib/api/merge_requests.rb +++ b/lib/api/merge_requests.rb @@ -369,11 +369,11 @@ module API merge_request.update(squash: params[:squash]) if params[:squash] - merge_params = { + merge_params = HashWithIndifferentAccess.new( commit_message: params[:merge_commit_message], squash_commit_message: params[:squash_commit_message], should_remove_source_branch: params[:should_remove_source_branch] - } + ) if merge_when_pipeline_succeeds && merge_request.head_pipeline && merge_request.head_pipeline.active? ::MergeRequests::MergeWhenPipelineSucceedsService |