diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-08-06 00:48:27 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-08-06 00:55:34 +0200 |
commit | 9d5ebedce36dd52858f1136e6f6a752448bd5868 (patch) | |
tree | 152be62ada1745e94b1e9e685ef184913d6baaac /app/models/commit.rb | |
parent | 3890f722d2bdd8964bac776f92772cc447d2b44c (diff) | |
download | gitlab-ci-broken-yaml-errors.tar.gz |
Prefer `failed` commit status over `skipped` if no builds were createdbroken-yaml-errors
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index ec65d19..68057b7 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -161,15 +161,13 @@ class Commit < ActiveRecord::Base end def status - if skip_ci? || builds.none? + if skip_ci? return 'skipped' - end - - if yaml_errors.present? + elsif yaml_errors.present? return 'failed' - end - - if success? + elsif builds.none? + return 'skipped' + elsif success? 'success' elsif pending? 'pending' |