Commit cba9eeb6 authored by Kamil Trzciński's avatar Kamil Trzciński

Fix legacy_stages

parent bb5193bd
......@@ -407,11 +407,10 @@ module Ci
def legacy_stages_using_composite_status
stages = statuses.latest
.group_by(&:stage_idx)
.sort_by(&:first)
.order(:stage_idx, :stage)
.group_by(&:stage)
stages.map do |stage_idx, jobs|
stage_name = jobs.first.stage
stages.map do |stage_name, jobs|
jobs_statuses = jobs.pluck(:status, :allow_failure)
composite_status = Gitlab::Ci::Status::Composite
......
......@@ -73,7 +73,7 @@ module Gitlab
def only_of?(*names)
matching = names.count { |name| @status_set.include?(name) }
matching > 0 && \
matching > 0 &&
matching == @status_set.size
end
......
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