Skip buils that were canceled but not started yet

This commit is contained in:
Grzegorz Bizon 2017-02-07 11:43:25 +01:00
parent b609ee55f2
commit a70a83cf29
1 changed files with 2 additions and 1 deletions

View File

@ -65,7 +65,8 @@ class CommitStatus < ActiveRecord::Base
end
event :cancel do
transition [:created, :pending, :running] => :canceled
transition [:pending, :running] => :canceled
transition [:created] => :skipped
end
before_transition created: [:pending, :running] do |commit_status|