Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/ci/pipeline_type.rb')
-rw-r--r--app/graphql/types/ci/pipeline_type.rb52
1 files changed, 28 insertions, 24 deletions
diff --git a/app/graphql/types/ci/pipeline_type.rb b/app/graphql/types/ci/pipeline_type.rb
index 4709d5e8dd6..2c386c9b564 100644
--- a/app/graphql/types/ci/pipeline_type.rb
+++ b/app/graphql/types/ci/pipeline_type.rb
@@ -8,94 +8,98 @@ module Types
connection_type_class(Types::CountableConnectionType)
authorize :read_pipeline
+ present_using ::Ci::PipelinePresenter
expose_permissions Types::PermissionTypes::Ci::Pipeline
field :id, GraphQL::ID_TYPE, null: false,
- description: 'ID of the pipeline'
+ description: 'ID of the pipeline.'
field :iid, GraphQL::STRING_TYPE, null: false,
- description: 'Internal ID of the pipeline'
+ description: 'Internal ID of the pipeline.'
field :sha, GraphQL::STRING_TYPE, null: false,
- description: "SHA of the pipeline's commit"
+ description: "SHA of the pipeline's commit."
field :before_sha, GraphQL::STRING_TYPE, null: true,
- description: 'Base SHA of the source branch'
+ description: 'Base SHA of the source branch.'
field :status, PipelineStatusEnum, null: false,
description: "Status of the pipeline (#{::Ci::Pipeline.all_state_names.compact.join(', ').upcase})"
+ field :warnings, GraphQL::BOOLEAN_TYPE, null: false, method: :has_warnings?,
+ description: "Indicates if a pipeline has warnings."
+
field :detailed_status, Types::Ci::DetailedStatusType, null: false,
- description: 'Detailed status of the pipeline'
+ description: 'Detailed status of the pipeline.'
field :config_source, PipelineConfigSourceEnum, null: true,
- description: "Config source of the pipeline (#{::Enums::Ci::Pipeline.config_sources.keys.join(', ').upcase})"
+ description: "Configuration source of the pipeline (#{::Enums::Ci::Pipeline.config_sources.keys.join(', ').upcase})"
field :duration, GraphQL::INT_TYPE, null: true,
- description: 'Duration of the pipeline in seconds'
+ description: 'Duration of the pipeline in seconds.'
field :coverage, GraphQL::FLOAT_TYPE, null: true,
- description: 'Coverage percentage'
+ description: 'Coverage percentage.'
field :created_at, Types::TimeType, null: false,
- description: "Timestamp of the pipeline's creation"
+ description: "Timestamp of the pipeline's creation."
field :updated_at, Types::TimeType, null: false,
- description: "Timestamp of the pipeline's last activity"
+ description: "Timestamp of the pipeline's last activity."
field :started_at, Types::TimeType, null: true,
- description: 'Timestamp when the pipeline was started'
+ description: 'Timestamp when the pipeline was started.'
field :finished_at, Types::TimeType, null: true,
- description: "Timestamp of the pipeline's completion"
+ description: "Timestamp of the pipeline's completion."
field :committed_at, Types::TimeType, null: true,
- description: "Timestamp of the pipeline's commit"
+ description: "Timestamp of the pipeline's commit."
field :stages, Types::Ci::StageType.connection_type, null: true,
- description: 'Stages of the pipeline',
+ description: 'Stages of the pipeline.',
extras: [:lookahead],
resolver: Resolvers::Ci::PipelineStagesResolver
field :user, Types::UserType, null: true,
- description: 'Pipeline user'
+ description: 'Pipeline user.'
field :retryable, GraphQL::BOOLEAN_TYPE,
- description: 'Specifies if a pipeline can be retried',
+ description: 'Specifies if a pipeline can be retried.',
method: :retryable?,
null: false
field :cancelable, GraphQL::BOOLEAN_TYPE,
- description: 'Specifies if a pipeline can be canceled',
+ description: 'Specifies if a pipeline can be canceled.',
method: :cancelable?,
null: false
field :jobs,
::Types::Ci::JobType.connection_type,
null: true,
- description: 'Jobs belonging to the pipeline',
+ description: 'Jobs belonging to the pipeline.',
resolver: ::Resolvers::Ci::JobsResolver
field :source_job, Types::Ci::JobType, null: true,
- description: 'Job where pipeline was triggered from'
+ description: 'Job where pipeline was triggered from.'
field :downstream, Types::Ci::PipelineType.connection_type, null: true,
- description: 'Pipelines this pipeline will trigger',
+ description: 'Pipelines this pipeline will trigger.',
method: :triggered_pipelines_with_preloads
field :upstream, Types::Ci::PipelineType, null: true,
- description: 'Pipeline that triggered the pipeline',
+ description: 'Pipeline that triggered the pipeline.',
method: :triggered_by_pipeline
field :path, GraphQL::STRING_TYPE, null: true,
- description: "Relative path to the pipeline's page"
+ description: "Relative path to the pipeline's page."
field :project, Types::ProjectType, null: true,
- description: 'Project the pipeline belongs to'
+ description: 'Project the pipeline belongs to.'
field :active, GraphQL::BOOLEAN_TYPE, null: false, method: :active?,
- description: 'Indicates if the pipeline is active'
+ description: 'Indicates if the pipeline is active.'
def detailed_status
object.detailed_status(context[:current_user])