Class: Fastlane::Actions::SetupGitConfigAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/stream_actions/actions/setup_git_config.rb

Documentation collapse

Class Method Summary collapse

Class Method Details

.available_optionsObject


17
18
19
20
21
22
23
24
25
# File 'lib/fastlane/plugin/stream_actions/actions/setup_git_config.rb', line 17

def self.available_options
  [
    FastlaneCore::ConfigItem.new(
      key: :username,
      description: 'Username',
      optional: true
    )
  ]
end

.descriptionObject


13
14
15
# File 'lib/fastlane/plugin/stream_actions/actions/setup_git_config.rb', line 13

def self.description
  'Update git config details'
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)

27
28
29
# File 'lib/fastlane/plugin/stream_actions/actions/setup_git_config.rb', line 27

def self.is_supported?(platform)
  true
end

.run(params) ⇒ Object


4
5
6
7
# File 'lib/fastlane/plugin/stream_actions/actions/setup_git_config.rb', line 4

def self.run(params)
  params[:username] ||= 'Stream Bot'
  sh("git config --global user.name '#{params[:username]}'")
end