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:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-02-28 18:48:39 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-03-06 12:04:04 +0300
commitbe039d22d71afa7c8b2635cd8820b8b4566d15b8 (patch)
tree2bbd17d43614ae93ed5bca9cb901fb788ce33b37 /app/models/commit_status.rb
parent6cc02e084f96d7d3cb56870cbe545c67e6a564bb (diff)
Make manual actions blocking
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r--app/models/commit_status.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb
index fc750a3e5e9..bca61151eff 100644
--- a/app/models/commit_status.rb
+++ b/app/models/commit_status.rb
@@ -25,13 +25,13 @@ class CommitStatus < ActiveRecord::Base
end
scope :failed_but_allowed, -> do
- where(allow_failure: true, status: [:failed, :canceled])
+ where(allow_failure: true, status: [:failed, :canceled, :manual])
end
scope :exclude_ignored, -> do
# We want to ignore failed_but_allowed jobs
where("allow_failure = ? OR status IN (?)",
- false, all_state_names - [:failed, :canceled])
+ false, all_state_names - [:failed, :canceled, :manual])
end
scope :retried, -> { where.not(id: latest) }
@@ -42,11 +42,11 @@ class CommitStatus < ActiveRecord::Base
state_machine :status do
event :enqueue do
- transition [:created, :skipped] => :pending
+ transition [:created, :skipped, :manual] => :pending
end
event :process do
- transition skipped: :created
+ transition [:skipped, :manual] => :created
end
event :run do
@@ -66,7 +66,7 @@ class CommitStatus < ActiveRecord::Base
end
event :cancel do
- transition [:created, :pending, :running] => :canceled
+ transition [:created, :pending, :running, :manual] => :canceled
end
before_transition created: [:pending, :running] do |commit_status|