summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-24 11:21:39 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-24 11:21:39 +0200
commit9c4307e287cade71c180c4c37fb14a018cf9fe28 (patch)
treee8046edb0556f63b594ef4ea0846b561b6654e79
parent5faf3e8176fc68fdcff18de4f28360765432739a (diff)
downloadgitlab-ce-9c4307e287cade71c180c4c37fb14a018cf9fe28.tar.gz
Show CI status on commit page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--app/controllers/projects/commit_controller.rb2
-rw-r--r--app/views/projects/commit/_commit_box.html.haml7
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