diff options
Diffstat (limited to 'app/graphql/types/ci/job_type.rb')
-rw-r--r-- | app/graphql/types/ci/job_type.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/graphql/types/ci/job_type.rb b/app/graphql/types/ci/job_type.rb index 928ca2f597d..1320b96907e 100644 --- a/app/graphql/types/ci/job_type.rb +++ b/app/graphql/types/ci/job_type.rb @@ -50,6 +50,8 @@ module Types null: true, description: 'How long the job was enqueued before starting.' + field :downstream_pipeline, Types::Ci::PipelineType, null: true, + description: 'Downstream pipeline for a bridge.' field :previous_stage_jobs_or_needs, Types::Ci::JobNeedUnion.connection_type, null: true, description: 'Jobs that must complete before the job runs. Returns `BuildNeed`, which is the needed jobs if the job uses the `needs` keyword, or the previous stage jobs otherwise.' field :detailed_status, Types::Ci::DetailedStatusType, null: true, @@ -89,6 +91,10 @@ module Types Gitlab::Graphql::Loaders::BatchModelLoader.new(::Ci::Pipeline, object.pipeline_id).find end + def downstream_pipeline + object.downstream_pipeline if object.respond_to?(:downstream_pipeline) + end + def tags object.tags.map(&:name) if object.is_a?(::Ci::Build) end |