summaryrefslogtreecommitdiff
path: root/app/models/commit_status.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-12-05 17:52:50 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2016-12-06 14:13:21 +0100
commit260d754ca89c14297e0e360d35d7914d57e290bf (patch)
treefbfda69e5237326b6e5accd093b8d43d7b88a300 /app/models/commit_status.rb
parent6d80b94a89cd2151cbf37f6f98f79d23df7fa638 (diff)
downloadgitlab-ce-260d754ca89c14297e0e360d35d7914d57e290bf.tar.gz
Fix handling of allowed to failure jobs
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r--app/models/commit_status.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb
index 2a537dc2a13..cf90475f4d4 100644
--- a/app/models/commit_status.rb
+++ b/app/models/commit_status.rb
@@ -31,14 +31,9 @@ class CommitStatus < ActiveRecord::Base
end
scope :exclude_ignored, -> do
- quoted_when = connection.quote_column_name('when')
# We want to ignore failed_but_allowed jobs
where("allow_failure = ? OR status IN (?)",
- false, all_state_names - [:failed, :canceled]).
- # We want to ignore skipped manual jobs
- where("#{quoted_when} <> ? OR status <> ?", 'manual', 'skipped').
- # We want to ignore skipped on_failure
- where("#{quoted_when} <> ? OR status <> ?", 'on_failure', 'skipped')
+ false, all_state_names - [:failed, :canceled])
end
scope :latest_ordered, -> { latest.ordered.includes(project: :namespace) }