Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-03-06 16:43:32 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-03-06 16:43:32 +0300
commitc4d5b231ed5888367912db000ebd8e2856709bc0 (patch)
tree87c8eb81df3bf9d132563c3c22af55a1c73e48f7 /app/models/commit_status.rb
parenta004a9743a356597b97cc38103bd193cf6660753 (diff)
Ignore optional actions when calculating warnings
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r--app/models/commit_status.rb6
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