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

sha_format_enum.rb « types « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2e0e5bb85f37fb02ce1197a08abfda7eff026c20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module Types
  class ShaFormatEnum < BaseEnum
    graphql_name 'ShaFormat'
    description 'How to format SHA strings.'

    FORMATS_DESCRIPTION = {
      short: 'Abbreviated format. Short SHAs are typically eight characters long.',
      long: 'Unabbreviated format.'
    }.freeze

    FORMATS_DESCRIPTION.each do |format, description|
      value format.to_s.upcase,
            description: description,
            value: format.to_s
    end
  end
end