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

pipeline_trigger_type.rb « ci « types « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 81345c14ba0b72e0d7bcfa9bc75a6d6c52fb02eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# frozen_string_literal: true

module Types
  module Ci
    class PipelineTriggerType < BaseObject
      graphql_name 'PipelineTrigger'

      present_using ::Ci::TriggerPresenter
      connection_type_class Types::CountableConnectionType

      authorize :admin_build

      field :can_access_project, GraphQL::Types::Boolean,
        null: false,
        description: 'Indicates if the pipeline trigger token has access to the project.',
        method: :can_access_project?

      field :description, GraphQL::Types::String,
        null: true,
        description: 'Description of the pipeline trigger token.'

      field :has_token_exposed, GraphQL::Types::Boolean,
        null: false,
        description: 'Indicates if the token is exposed.',
        method: :has_token_exposed?

      field :id, GraphQL::Types::ID,
        null: false,
        description: 'ID of the pipeline trigger token.'

      field :last_used, Types::TimeType,
        null: true,
        description: 'Timestamp of the last usage of the pipeline trigger token.'

      field :owner, Types::UserType,
        null: false,
        description: 'Owner of the pipeline trigger token.'

      field :token, GraphQL::Types::String,
        null: false,
        description: 'Value of the pipeline trigger token.'
    end
  end
end