Class: Fastlane::Plugin::GitHubStatus::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/github_status/options.rb

Constant Summary collapse

ABORT_STATUSES =

Excludes ‘good’ as a valid choice for wanting to abort the build

Plugin::GitHubStatus::Message::STATUS_RANKING.drop(1)
ABORT_CHOICES =
"'#{ABORT_STATUSES.join("', '")}'"

Class Method Summary collapse

Class Method Details

.available_optionsObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/fastlane/plugin/github_status/options.rb', line 9

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :abort_level,
                            env_name: "GITHUB_STATUS_ABORT_LEVEL",
                         description: "The GitHub status at or above which execution should abort. Valid values are: #{ABORT_CHOICES}",
                            optional: true,
                                type: String,
                       default_value: nil,
                        verify_block: proc do |value|
                                        valid = value.nil? || ABORT_STATUSES.include?(value)

                                        unless valid
                                          FastlaneCore::UI.user_error!("abort_level must be one of: #{ABORT_CHOICES}")
                                        end
                                      end)
  ]
end