diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-11-04 18:32:39 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-11-04 18:32:39 +0200 |
commit | 0b66f65d66c59dc00387272935bd17878ea13b95 (patch) | |
tree | 5a6b433db84e723812dacffacbc785e665cd3aaf /app/models/commit.rb | |
parent | 11218e13414814e00cbeffe05077718f856af897 (diff) | |
download | gitlab-ci-0b66f65d66c59dc00387272935bd17878ea13b95.tar.gz |
Add status method to commit controller for GitLab MR integration
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 60d7c3d..5a01667 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -122,10 +122,10 @@ class Commit < ActiveRecord::Base def status if success? 'success' - elsif running? - 'running' elsif pending? 'pending' + elsif running? + 'running' else 'failed' end @@ -139,7 +139,7 @@ class Commit < ActiveRecord::Base def running? builds_without_retry.any? do |build| - build.running? + build.running? || build.pending? end end |