Commit eb94d36d authored by Ash McKenzie's avatar Ash McKenzie

Rename #close_merge_request_without_source_project

#close_merge_request_without_source_project -> close_merge_request_if_no_source_project
parent bbafb853
...@@ -29,11 +29,11 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo ...@@ -29,11 +29,11 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
def show def show
validates_merge_request validates_merge_request
close_merge_request_without_source_project
check_if_can_be_merged check_if_can_be_merged
# Return if the response has already been rendered # Return if the response has already been rendered
return if response_body return if response_body
close_merge_request_if_no_source_project
respond_to do |format| respond_to do |format|
format.html do format.html do
...@@ -261,7 +261,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo ...@@ -261,7 +261,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
@merge_request.head_pipeline && @merge_request.head_pipeline.active? @merge_request.head_pipeline && @merge_request.head_pipeline.active?
end end
def close_merge_request_without_source_project def close_merge_request_if_no_source_project
if !@merge_request.source_project && @merge_request.open? if !@merge_request.source_project && @merge_request.open?
@merge_request.close @merge_request.close
end end
......
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