Skip to content
Snippets Groups Projects
Verified Commit fe6ec80e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Render CI status on merge requests index page

parent 61fcb3c5
Branches
Tags
No related merge requests found
Loading
Loading
@@ -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)
Loading
Loading
Loading
Loading
@@ -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
- ci_commit = merge_request.ci_commit
%li{ class: mr_css_classes(merge_request) }
.merge-request-title
%span.merge-request-title-text
Loading
Loading
@@ -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
Loading
Loading
- 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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment