diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-10-06 12:01:16 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-10-12 11:53:49 +0200 |
commit | 914cfbd2f154ed3154a7dc3cee3309713eea786f (patch) | |
tree | 445862a347f3c915b2c41f0e8ba26d362017aa52 /app/models/commit.rb | |
parent | 5ffbf5feb7577ec3affc32992c79cddca3036c4d (diff) | |
download | gitlab-ce-914cfbd2f154ed3154a7dc3cee3309713eea786f.tar.gz |
Implement Commit Status API
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 8 |
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 |