summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-10-14 12:44:28 +0200
committerDouwe Maan <douwe@gitlab.com>2015-10-14 13:23:01 +0200
commitd10e3c4498e11e97548b0212887a146d19d19ffd (patch)
tree40160307c143e1796e1dad5e55caf1b9d4a7cdfb /app/models/commit.rb
parent3a69dd20a1d8e54c25f871f35f09a1b8b5d4b2a4 (diff)
parent82da19cecd6390d2372bad36da0a9f89b21abb38 (diff)
downloadgitlab-ce-d10e3c4498e11e97548b0212887a146d19d19ffd.tar.gz
Merge branch 'master' into filter-labelfilter-label
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index aff329d71fa..d5c50013525 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -184,4 +184,12 @@ class Commit
def parents
@parents ||= Commit.decorate(super, project)
end
+
+ def ci_commit
+ project.ci_commit(sha)
+ end
+
+ def status
+ ci_commit.try(:status) || :not_found
+ end
end