Commit a70a83cf authored by Grzegorz Bizon's avatar Grzegorz Bizon

Skip buils that were canceled but not started yet

parent b609ee55
...@@ -65,7 +65,8 @@ class CommitStatus < ActiveRecord::Base ...@@ -65,7 +65,8 @@ class CommitStatus < ActiveRecord::Base
end end
event :cancel do event :cancel do
transition [:created, :pending, :running] => :canceled transition [:pending, :running] => :canceled
transition [:created] => :skipped
end end
before_transition created: [:pending, :running] do |commit_status| before_transition created: [:pending, :running] do |commit_status|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment