summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMark Fletcher <mark@gitlab.com>2016-10-11 16:52:49 +0100
committerMark Fletcher <mark@gitlab.com>2016-10-13 10:58:28 +0100
commit3c476ee62512a0642ca3e5e6b228f9abdd867a34 (patch)
tree177f343b7afb5b6b40029dd6bf0e25a2b83d6db9 /app
parenta053430e94e21bbf81524304f9b52a106f654b54 (diff)
downloadgitlab-ce-3c476ee62512a0642ca3e5e6b228f9abdd867a34.tar.gz
Maintain "force_remove_source_branch" options on Merge Request unless specified
Diffstat (limited to 'app')
-rw-r--r--app/services/merge_requests/update_service.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/services/merge_requests/update_service.rb b/app/services/merge_requests/update_service.rb
index 9dbec49d163..a37cc3fdf21 100644
--- a/app/services/merge_requests/update_service.rb
+++ b/app/services/merge_requests/update_service.rb
@@ -15,7 +15,10 @@ module MergeRequests
params.except!(:target_branch, :force_remove_source_branch)
end
- merge_request.merge_params['force_remove_source_branch'] = params.delete(:force_remove_source_branch)
+ if params[:force_remove_source_branch].present?
+ merge_request.merge_params['force_remove_source_branch'] = params.delete(:force_remove_source_branch)
+ end
+
handle_wip_event(merge_request)
update(merge_request)
end