diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-12-16 16:39:35 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-12-16 16:39:35 +0000 |
commit | 9908da17c13b582c3faa920e53691658bfe23896 (patch) | |
tree | d9637002702edd999db2407aaaea6818841b263b | |
parent | 747f0a328cf2ef6765b2ce53786d4dd5995a99c5 (diff) | |
parent | 95c03f245f2fd25d6d38715630859859965965ee (diff) | |
download | gitlab-ce-9908da17c13b582c3faa920e53691658bfe23896.tar.gz |
Merge branch 'fix-endpoint-not-setting-var' into 'master'
Fix endpoint not setting needed @ci_commit
/cc @DouweM
See merge request !2112
-rw-r--r-- | app/controllers/projects/merge_requests_controller.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index fffd90d87eb..00321189e99 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -7,7 +7,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController before_action :closes_issues, only: [:edit, :update, :show, :diffs, :commits, :builds] before_action :validates_merge_request, only: [:show, :diffs, :commits, :builds] before_action :define_show_vars, only: [:show, :diffs, :commits, :builds] - before_action :define_widget_vars, only: [:merge, :cancel_merge_when_build_succeeds] + before_action :define_widget_vars, only: [:merge, :cancel_merge_when_build_succeeds, :merge_check] before_action :ensure_ref_fetched, only: [:show, :diffs, :commits, :builds] # Allow read any merge_request @@ -153,11 +153,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController end def merge_check - if @merge_request.unchecked? - @merge_request.check_if_can_be_merged - end - - closes_issues + @merge_request.check_if_can_be_merged if @merge_request.unchecked? render partial: "projects/merge_requests/widget/show.html.haml", layout: false end @@ -299,6 +295,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController def define_widget_vars @ci_commit = @merge_request.ci_commit + closes_issues end def invalid_mr |