summaryrefslogtreecommitdiff
path: root/app/graphql/types/ci/job_artifact_file_type_enum.rb
blob: 5099b0d4850bfb3ec7314021b1032d858dda2763 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

module Types
  module Ci
    class JobArtifactFileTypeEnum < BaseEnum
      graphql_name 'JobArtifactFileType'

      ::Ci::JobArtifact::TYPE_AND_FORMAT_PAIRS.keys.each do |file_type|
        description = file_type == :codequality ? "CODE QUALITY" : file_type.to_s.titleize.upcase  # This is needed as doc lint will not allow codequality as one word
        value file_type.to_s.upcase, value: file_type.to_s, description: "#{description} job artifact file type."
      end
    end
  end
end