BigW Consortium Gitlab

Commit 5983e9bd by Zeger-Jan van de Weg

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
parent eaecd397
......@@ -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