summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/commit.rb12
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'