Commit 45593d57 authored by Douwe Maan's avatar Douwe Maan

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
parents c8102343 5983e9bd
......@@ -12,7 +12,7 @@
- else
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)
- if remove_source_branch_button || user_can_cancel_automatic_merge
.clearfix.prepend-top-10
......
Markdown is supported
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