summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-10-15 11:26:58 +0200
committerDouwe Maan <douwe@gitlab.com>2015-10-15 11:26:58 +0200
commit95f0440a7823a927ebba1557b091c12255e49ac4 (patch)
treefa6d130f2baff18e7a70d74dafe79e20da35babe /app/models/commit.rb
parent4a5b77188ec7525d1c3a1ee925c8791f841b040c (diff)
parent123669a55107514798ba531ba3a744b3ec8503ee (diff)
downloadgitlab-ce-95f0440a7823a927ebba1557b091c12255e49ac4.tar.gz
Merge branch 'master' into rs-redactor-filter
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 95ac7156bed..23b5e38336c 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