diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-03-06 14:43:32 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-03-06 14:43:32 +0100 |
commit | c4d5b231ed5888367912db000ebd8e2856709bc0 (patch) | |
tree | 87c8eb81df3bf9d132563c3c22af55a1c73e48f7 /app/models/commit_status.rb | |
parent | a004a9743a356597b97cc38103bd193cf6660753 (diff) | |
download | gitlab-ce-c4d5b231ed5888367912db000ebd8e2856709bc0.tar.gz |
Ignore optional actions when calculating warnings
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r-- | app/models/commit_status.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index 44b2c1fb1db..7e23e14794f 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -25,11 +25,13 @@ class CommitStatus < ActiveRecord::Base end scope :failed_but_allowed, -> do - where(allow_failure: true, status: [:failed, :canceled, :manual]) + where(allow_failure: true, status: [:failed, :canceled]) end scope :exclude_ignored, -> do - # We want to ignore failed but allowed to fail jobs + # We want to ignore failed but allowed to fail jobs. + # + # TODO, we also skip ignored optional manual actions. where("allow_failure = ? OR status IN (?)", false, all_state_names - [:failed, :canceled, :manual]) end |