From 3f145899cac85efec748e2c15a535a300313503d Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Tue, 14 Mar 2017 20:51:32 -0400 Subject: [PATCH] Check remove source branch when merge is in progress --- app/views/projects/merge_requests/merge.js.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/projects/merge_requests/merge.js.haml b/app/views/projects/merge_requests/merge.js.haml index f0a23bec5e7..e632fc681cf 100644 --- a/app/views/projects/merge_requests/merge.js.haml +++ b/app/views/projects/merge_requests/merge.js.haml @@ -1,7 +1,8 @@ - case @status - when :success + - remove_source_branch = params[:should_remove_source_branch] == '1' || @merge_request.remove_source_branch? :plain - merge_request_widget.mergeInProgress(#{params[:should_remove_source_branch] == '1'}); + merge_request_widget.mergeInProgress(#{remove_source_branch}); - when :merge_when_pipeline_succeeds :plain $('.mr-widget-body').html("#{escape_javascript(render('projects/merge_requests/widget/open/merge_when_pipeline_succeeds'))}");