summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-11-04 18:07:54 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-11-04 18:07:54 +0200
commit11218e13414814e00cbeffe05077718f856af897 (patch)
treece24e898f6a962f2a0364e45e15ef55b52673180 /app/models/commit.rb
parent0a002b8d897047c7a9951c015af689896194c687 (diff)
downloadgitlab-ci-11218e13414814e00cbeffe05077718f856af897.tar.gz
Add naming to jobs
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 859522c..60d7c3d 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -161,4 +161,10 @@ class Commit < ActiveRecord::Base
def finished_at
end
+
+ def coverage
+ if builds.size == 1
+ builds.first.coverage
+ end
+ end
end