diff options
author | Rémy Coutable <remy@rymai.me> | 2016-10-13 13:19:56 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-10-13 13:19:56 +0000 |
commit | b3e989b057ff9cd1973f0927b4b0f0d28b1e0c6b (patch) | |
tree | 05fb4bf893259319bef3b229eb72724191b3ac29 /app/services/merge_requests | |
parent | 2362dfee686ab715ef6a3bd00b389ab321e7a728 (diff) | |
parent | 3c476ee62512a0642ca3e5e6b228f9abdd867a34 (diff) | |
download | gitlab-ce-b3e989b057ff9cd1973f0927b4b0f0d28b1e0c6b.tar.gz |
Merge branch '23234-deleting-a-milestone-removes-source-branch-deletion-options-of-associated-merge-requests' into 'master'
Maintain "force_remove_source_branch" options on Merge Request unless specified
## What does this MR do?
Fixes a problem where Merge Requests were losing the state associated with the flag to remove the source branch upon merge
* Closes #23234
* Closes #23191
* Closes #19351
See merge request !6817
Diffstat (limited to 'app/services/merge_requests')
-rw-r--r-- | app/services/merge_requests/update_service.rb | 5 |
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 |