diff options
Diffstat (limited to 'app/graphql/types/ci/stage_type.rb')
-rw-r--r-- | app/graphql/types/ci/stage_type.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/graphql/types/ci/stage_type.rb b/app/graphql/types/ci/stage_type.rb index c0d931b3d31..70e78e391a7 100644 --- a/app/graphql/types/ci/stage_type.rb +++ b/app/graphql/types/ci/stage_type.rb @@ -4,7 +4,7 @@ module Types module Ci class StageType < BaseObject graphql_name 'CiStage' - authorize :read_commit_status + authorize :read_build field :id, GraphQL::Types::ID, null: false, description: 'ID of the stage.' @@ -31,7 +31,10 @@ module Types BatchLoader::GraphQL.for(key).batch(default_value: []) do |keys, loader| by_pipeline = keys.group_by(&:pipeline) - include_needs = keys.any? { |k| k.requires?(%i[nodes jobs nodes needs]) } + include_needs = keys.any? do |k| + k.requires?(%i[nodes jobs nodes needs]) || + k.requires?(%i[nodes jobs nodes previousStageJobsAndNeeds]) + end by_pipeline.each do |pl, key_group| project = pl.project |