summaryrefslogtreecommitdiff
path: root/app/models/commit_status.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-01-24 15:18:47 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-01-25 10:41:46 +0100
commit2d154cee32a01fd0880594d9635362df13bcdfb1 (patch)
treece57ec798f2c5b2bc078ecd207e404d3177b5c11 /app/models/commit_status.rb
parent287c6ed149991fcb74ee2088c1dcb7beadefc7bf (diff)
downloadgitlab-ce-2d154cee32a01fd0880594d9635362df13bcdfb1.tar.gz
Move processables scope into commit status class
Diffstat (limited to 'app/models/commit_status.rb')
-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 0f50bd39131..7f6562b63e5 100644
--- a/app/models/commit_status.rb
+++ b/app/models/commit_status.rb
@@ -41,6 +41,7 @@ class CommitStatus < ActiveRecord::Base
scope :latest_ordered, -> { latest.ordered.includes(project: :namespace) }
scope :retried_ordered, -> { retried.ordered.includes(project: :namespace) }
scope :after_stage, -> (index) { where('stage_idx > ?', index) }
+ scope :processables, -> { where(type: %w[Ci::Build Ci::Bridge]) }
# We use `CommitStatusEnums.failure_reasons` here so that EE can more easily
# extend this `Hash` with new values.