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
Tatuya Kamada
gitlab-ce
Commits
fe6ec80e
Commit
fe6ec80e
authored
Oct 23, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Render CI status on merge requests index page
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
61fcb3c5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
3 deletions
+14
-3
CHANGELOG
CHANGELOG
+1
-0
app/models/merge_request.rb
app/models/merge_request.rb
+8
-2
app/views/projects/merge_requests/_merge_request.html.haml
app/views/projects/merge_requests/_merge_request.html.haml
+4
-0
app/views/projects/merge_requests/widget/_heading.html.haml
app/views/projects/merge_requests/widget/_heading.html.haml
+1
-1
No files found.
CHANGELOG
View file @
fe6ec80e
...
...
@@ -11,6 +11,7 @@ v 8.2.0 (unreleased)
- Show "Empty Repository Page" for repository without branches (Artem V. Navrotskiy)
- Fix: Inability to reply to code comments in the MR view, if the MR comes from a fork
- Use git follow flag for commits page when retrieve history for file or directory
- Show merge request CI status on merge requests index page
v 8.1.0
- Ensure MySQL CI limits DB migrations occur after the fields have been created (Stan Hu)
...
...
app/models/merge_request.rb
View file @
fe6ec80e
...
...
@@ -159,11 +159,11 @@ class MergeRequest < ActiveRecord::Base
def
last_commit
merge_request_diff
?
merge_request_diff
.
last_commit
:
compare_commits
.
last
end
end
def
first_commit
merge_request_diff
?
merge_request_diff
.
first_commit
:
compare_commits
.
first
end
end
def
last_commit_short_sha
last_commit
.
short_id
...
...
@@ -470,4 +470,10 @@ class MergeRequest < ActiveRecord::Base
unlock_mr
if
locked?
end
end
def
ci_commit
if
last_commit
source_project
.
ci_commit
(
last_commit
.
id
)
end
end
end
app/views/projects/merge_requests/_merge_request.html.haml
View file @
fe6ec80e
-
ci_commit
=
merge_request
.
ci_commit
%li
{
class:
mr_css_classes
(
merge_request
)
}
.merge-request-title
%span
.merge-request-title-text
...
...
@@ -6,6 +7,9 @@
-
merge_request
.
labels
.
each
do
|
label
|
=
link_to_label
(
label
,
project:
merge_request
.
project
)
.pull-right.light
-
if
ci_commit
=
link_to
ci_status_path
(
ci_commit
),
class:
"c
#{
ci_status_color
(
ci_commit
)
}
"
do
=
ci_status_icon
(
ci_commit
)
-
if
merge_request
.
merged?
%span
%i
.fa.fa-check
...
...
app/views/projects/merge_requests/widget/_heading.html.haml
View file @
fe6ec80e
-
ci_commit
=
@merge_request
.
source_project
.
ci_commit
(
@merge_request
.
source_sha
)
-
ci_commit
=
@merge_request
.
ci_commit
-
if
ci_commit
-
status
=
ci_commit
.
status
.mr-widget-heading
...
...
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