Make the cases clear instead of having guards
This commit is contained in:
parent
45afdbef0d
commit
3bb409d2ee
1 changed files with 3 additions and 3 deletions
|
@ -31,13 +31,13 @@ module Ci
|
|||
current_status = status_for_prior_stages(index)
|
||||
|
||||
created_builds_in_stage(index).select do |build|
|
||||
process_build(build, current_status)
|
||||
if HasStatus::COMPLETED_STATUSES.include?(current_status)
|
||||
process_build(build, current_status)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def process_build(build, current_status)
|
||||
return false unless HasStatus::COMPLETED_STATUSES.include?(current_status)
|
||||
|
||||
if valid_statuses_for_when(build.when).include?(current_status)
|
||||
build.enqueue
|
||||
true
|
||||
|
|
Loading…
Reference in a new issue