Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
28351806
Commit
28351806
authored
Dec 09, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give merge request widget the vars it desires
parent
eab086bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+5
-0
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
28351806
...
@@ -7,6 +7,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
...
@@ -7,6 +7,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
before_action
:closes_issues
,
only:
[
:edit
,
:update
,
:show
,
:diffs
,
:commits
,
:builds
]
before_action
:closes_issues
,
only:
[
:edit
,
:update
,
:show
,
:diffs
,
:commits
,
:builds
]
before_action
:validates_merge_request
,
only:
[
: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_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
]
before_action
:ensure_ref_fetched
,
only:
[
:show
,
:diffs
,
:commits
,
:builds
]
# Allow read any merge_request
# Allow read any merge_request
...
@@ -301,6 +302,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController
...
@@ -301,6 +302,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end
end
end
end
def
define_widget_vars
@ci_commit
=
@merge_request
.
ci_commit
end
def
invalid_mr
def
invalid_mr
# Render special view for MR with removed source or target branch
# Render special view for MR with removed source or target branch
render
'invalid'
render
'invalid'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment