Skip to content
Snippets Groups Projects
Commit 28351806 authored by Douwe Maan's avatar Douwe Maan
Browse files

Give merge request widget the vars it desires

parent eab086bd
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -7,6 +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 :ensure_ref_fetched, only: [:show, :diffs, :commits, :builds]
 
# Allow read any merge_request
Loading
Loading
@@ -301,6 +302,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end
end
 
def define_widget_vars
@ci_commit = @merge_request.ci_commit
end
def invalid_mr
# Render special view for MR with removed source or target branch
render 'invalid'
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment