diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-02-05 12:38:10 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-02-11 10:29:14 +0100 |
commit | 14f928b73005300f419adb839cfd7bb06435abb8 (patch) | |
tree | bd5dcb3ef3fe7721faaeef83a1ad83dd2a63a2dd /app | |
parent | 01a406f5b02a7c8f5133012931b56696c3d21fe8 (diff) | |
download | gitlab-ce-14f928b73005300f419adb839cfd7bb06435abb8.tar.gz |
Add CI status badge implementation to commit controller
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index 21f4d9f44ec..637a911177c 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -57,6 +57,12 @@ class Projects::CommitController < Projects::ApplicationController render layout: false end + def status + status_sha = ci_commit.sha if ci_commit + image = Ci::ImageForBuildService.new.execute(@project, sha: status_sha) + send_file(image.path, filename: image.name, disposition: 'inline', type: 'image/svg+xml') + end + private def commit |