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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
9907a7e6
Commit
9907a7e6
authored
Dec 08, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get ci_commit in MR controller
parent
35fd7112
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+2
-0
app/views/projects/merge_requests/widget/_heading.html.haml
app/views/projects/merge_requests/widget/_heading.html.haml
+4
-5
app/views/projects/merge_requests/widget/open/_accept.html.haml
...ews/projects/merge_requests/widget/open/_accept.html.haml
+1
-1
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
9907a7e6
...
...
@@ -264,6 +264,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@merge_request_diff
=
@merge_request
.
merge_request_diff
@ci_commit
=
@merge_request
.
ci_commit
if
@merge_request
.
locked_long_ago?
@merge_request
.
unlock_mr
@merge_request
.
close
...
...
app/views/projects/merge_requests/widget/_heading.html.haml
View file @
9907a7e6
-
ci_commit
=
@merge_request
.
ci_commit
-
if
ci_commit
-
status
=
ci_commit
.
status
-
if
@ci_commit
-
status
=
@ci_commit
.
status
.mr-widget-heading
.ci_widget
{
class:
"ci-#{status}"
}
=
ci_status_icon
(
ci_commit
)
=
ci_status_icon
(
@
ci_commit
)
%span
CI build
#{
status
}
for
#{
@merge_request
.
last_commit_short_sha
}
.
%span
.ci-coverage
=
link_to
"View build details"
,
ci_status_path
(
ci_commit
)
=
link_to
"View build details"
,
ci_status_path
(
@
ci_commit
)
-
elsif
@merge_request
.
has_ci?
-
# Compatibility with old CI integrations (ex jenkins) when you request status from CI server via AJAX
...
...
app/views/projects/merge_requests/widget/open/_accept.html.haml
View file @
9907a7e6
-
status_class
=
@
merge_request
.
ci_commit
?
" ci-
#{
@merge_request
.
ci_commit
.
status
}
"
:
nil
-
status_class
=
@
ci_commit
?
" ci-
#{
@
ci_commit
.
status
}
"
:
nil
=
form_for
[
:merge
,
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
@merge_request
],
remote:
true
,
method: :post
,
html:
{
class:
'accept-mr-form js-requires-input'
}
do
|
f
|
=
hidden_field_tag
:authenticity_token
,
form_authenticity_token
...
...
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