summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2018-06-05 21:43:29 +1000
committerAsh McKenzie <amckenzie@gitlab.com>2018-06-06 08:18:40 +1000
commiteb94d36d23025956832129525a2b3a424a57ffd7 (patch)
tree371b89361d810680e2baaf0d1c8f69790726d53b
parentbbafb85395cf2786f21a5a92745b9b3a181a4ce8 (diff)
downloadgitlab-ce-eb94d36d23025956832129525a2b3a424a57ffd7.tar.gz
Rename #close_merge_request_without_source_project
#close_merge_request_without_source_project -> close_merge_request_if_no_source_project
-rw-r--r--app/controllers/projects/merge_requests_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index ecea6e1b2bf..22319bf8738 100644
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -29,11 +29,11 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
def show
validates_merge_request
- close_merge_request_without_source_project
check_if_can_be_merged
# Return if the response has already been rendered
return if response_body
+ close_merge_request_if_no_source_project
respond_to do |format|
format.html do
@@ -261,7 +261,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
@merge_request.head_pipeline && @merge_request.head_pipeline.active?
end
- def close_merge_request_without_source_project
+ def close_merge_request_if_no_source_project
if !@merge_request.source_project && @merge_request.open?
@merge_request.close
end