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

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

module Types
  class ContainerExpirationPolicyOlderThanEnum < BaseEnum
    OPTIONS_MAPPING = {
      '7d': 'SEVEN_DAYS',
      '14d': 'FOURTEEN_DAYS',
      '30d': 'THIRTY_DAYS',
      '90d': 'NINETY_DAYS'
    }.freeze

    ::ContainerExpirationPolicy.older_than_options.each do |option, description|
      value OPTIONS_MAPPING[option], description, value: option.to_s
    end
  end
end