diff options
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 2 | ||||
-rw-r--r-- | app/views/projects/commit/_commit_box.html.haml | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index 78d42d695b6..2fae5057138 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -22,6 +22,8 @@ class Projects::CommitController < Projects::ApplicationController commit_id: @commit.id } + @ci_commit = project.ci_commit(commit.sha) + respond_to do |format| format.html format.diff { render text: @commit.to_diff } diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index 2ac79e87b4a..fbf0a9ec0c3 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -38,6 +38,13 @@ - @commit.parents.each do |parent| = link_to parent.short_id, namespace_project_commit_path(@project.namespace, @project, parent) +- if @ci_commit + .pull-right + = link_to ci_status_path(@ci_commit), class: "ci-status ci-#{@ci_commit.status}" do + = ci_status_icon(@ci_commit) + build: + = @ci_commit.status + .commit-info-row.branches %i.fa.fa-spinner.fa-spin |