summaryrefslogtreecommitdiff
path: root/app/graphql/types/ci/pipeline_scope_enum.rb
blob: 3ce81bc7bf3c03127054af78b2d8732618e16fd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

module Types
  module Ci
    class PipelineScopeEnum < BaseEnum
      SCOPES_DESCRIPTION = {
        running: 'Pipeline is running.',
        pending: 'Pipeline has not started running yet.',
        finished: 'Pipeline has completed.',
        branches: 'Branches.',
        tags: 'Tags.'
      }.freeze

      SCOPES_DESCRIPTION.each do |scope, description|
        value scope.to_s.upcase,
              description: description,
              value: scope.to_s
      end
    end
  end
end