Commit bdb3b9fe authored by Douwe Maan's avatar Douwe Maan
Browse files

Merge branch 'tweak-flow-merge-when-build-succeeds' into 'master'

Minor fix in flow 'Merge when build succeeds'

When a user, which is not the merge user, want to removes the source branch
after the automatic merge this might fail because of checks in the
DeleteBranchService

/cc @DouweM

See merge request !2070
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
- else - else
The source branch will not be removed. The source branch will not be removed.
- remove_source_branch_button = @merge_request.can_remove_source_branch?(current_user) && !should_remove_source_branch - remove_source_branch_button = @merge_request.can_remove_source_branch?(current_user) && !should_remove_source_branch && @merge_request.merge_user == current_user
- user_can_cancel_automatic_merge = @merge_request.can_cancel_merge_when_build_succeeds?(current_user) - user_can_cancel_automatic_merge = @merge_request.can_cancel_merge_when_build_succeeds?(current_user)
- if remove_source_branch_button || user_can_cancel_automatic_merge - if remove_source_branch_button || user_can_cancel_automatic_merge
.clearfix.prepend-top-10 .clearfix.prepend-top-10
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment