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:
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r--app/models/commit_status.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb
index 5f66a661324..c4b0136785b 100644
--- a/app/models/commit_status.rb
+++ b/app/models/commit_status.rb
@@ -41,7 +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]) }
+ scope :processables, -> { where(type: processable_types) }
# We use `CommitStatusEnums.failure_reasons` here so that EE can more easily
# extend this `Hash` with new values.
@@ -139,6 +139,10 @@ class CommitStatus < ActiveRecord::Base
end
end
+ def self.processable_types
+ %w[Ci::Build Ci::Bridge]
+ end
+
def locking_enabled?
status_changed?
end