diff options
Diffstat (limited to 'app/graphql/types/ci/job_type.rb')
-rw-r--r-- | app/graphql/types/ci/job_type.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/graphql/types/ci/job_type.rb b/app/graphql/types/ci/job_type.rb index b20a671179b..42b55f47f92 100644 --- a/app/graphql/types/ci/job_type.rb +++ b/app/graphql/types/ci/job_type.rb @@ -70,6 +70,8 @@ module Types description: 'Downstream pipeline for a bridge.' field :manual_job, GraphQL::Types::Boolean, null: true, description: 'Whether the job has a manual action.' + field :manual_variables, VariableType.connection_type, null: true, + description: 'Variables added to a manual job when the job is triggered.' field :playable, GraphQL::Types::Boolean, null: false, method: :playable?, description: 'Indicates the job can be played.' field :previous_stage_jobs_or_needs, Types::Ci::JobNeedUnion.connection_type, null: true, @@ -78,6 +80,8 @@ module Types description: 'Ref name of the job.' field :ref_path, GraphQL::Types::String, null: true, description: 'Path to the ref.' + field :retried, GraphQL::Types::Boolean, null: true, + description: 'Indicates that the job has been retried.' field :retryable, GraphQL::Types::Boolean, null: false, method: :retryable?, description: 'Indicates the job can be retried.' field :scheduling_type, GraphQL::Types::String, null: true, @@ -188,6 +192,14 @@ module Types def triggered object.try(:trigger_request) end + + def manual_variables + if object.manual? && object.respond_to?(:job_variables) + object.job_variables + else + [] + end + end end end end |