Allow build bending to transition straight to completed/failed

This commit is contained in:
Wedge 2019-03-26 09:39:20 +03:00
parent 96c1d2e3f5
commit 3243bbb6af
1 changed files with 2 additions and 2 deletions

View File

@ -265,12 +265,12 @@ class BuildList < ActiveRecord::Base
# ===== into testing - end
event :build_success do
transition [:build_started, :build_canceling, :build_canceled, :rerunning_tests] => :success
transition [:build_pending, :build_started, :build_canceling, :build_canceled, :rerunning_tests] => :success
end
[:build_error, :tests_failed].each do |kind|
event kind do
transition [:build_started, :build_canceling, :build_canceled] => kind
transition [:build_started, :build_canceling, :build_canceled, :build_pending] => kind
transition rerunning_tests: :tests_failed
end
end