summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-05-16 16:34:42 -0500
committerKamil Trzcinski <ayufan@ayufan.eu>2016-05-16 16:48:27 -0500
commitbf4dc75801176c95b49763ff6ab5e03305c91f73 (patch)
tree213e775f27af7534af0f0a5c2306e6f877779087 /app/models
parent003526e2ee408bc6be3596436288213cc57d1bcd (diff)
downloadgitlab-ce-bf4dc75801176c95b49763ff6ab5e03305c91f73.tar.gz
Improve the pipelines design
Diffstat (limited to 'app/models')
-rw-r--r--app/models/commit_status.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb
index 6fef1c038e9..1548a51e942 100644
--- a/app/models/commit_status.rb
+++ b/app/models/commit_status.rb
@@ -14,6 +14,7 @@ class CommitStatus < ActiveRecord::Base
alias_attribute :author, :user
scope :latest, -> { where(id: unscope(:select).select('max(id)').group(:name, :commit_id)) }
+ scope :retried, -> { where.not(id: latest) }
scope :ordered, -> { order(:name) }
scope :ignored, -> { where(allow_failure: true, status: [:failed, :canceled]) }