8114786665
Before this fix when there was only one relevant, previous build and it failed, but was allowed to fail, entire build had been marked as skipped. Closes #3192
19 lines
448 B
Ruby
19 lines
448 B
Ruby
module Ci
|
|
class Status
|
|
def self.get_status(statuses)
|
|
if statuses.none?
|
|
'skipped'
|
|
elsif statuses.all? { |status| status.success? || status.ignored? }
|
|
'success'
|
|
elsif statuses.all?(&:pending?)
|
|
'pending'
|
|
elsif statuses.any?(&:running?) || statuses.any?(&:pending?)
|
|
'running'
|
|
elsif statuses.all?(&:canceled?)
|
|
'canceled'
|
|
else
|
|
'failed'
|
|
end
|
|
end
|
|
end
|
|
end
|