diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-04-13 13:01:08 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-04-13 13:01:08 +0200 |
commit | f5d24e60f842096f670593fb4dd0d29c3f5d4fcc (patch) | |
tree | 36b7efa37b742c10be518d872bd2501b48d17af9 /app/models/ci/commit.rb | |
parent | 406a796f76824e18f4dca2d29c41dcc3d2e4d457 (diff) | |
download | gitlab-ce-f5d24e60f842096f670593fb4dd0d29c3f5d4fcc.tar.gz |
Pipeline view
Diffstat (limited to 'app/models/ci/commit.rb')
-rw-r--r-- | app/models/ci/commit.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/ci/commit.rb b/app/models/ci/commit.rb index 687654d3c89..7991b987e35 100644 --- a/app/models/ci/commit.rb +++ b/app/models/ci/commit.rb @@ -94,6 +94,13 @@ module Ci end end + def latest? + return false unless ref + commit = project.commit(ref) + return false unless commit + commit.sha == sha + end + def triggered? trigger_requests.any? end |