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



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

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

.descriptionObject



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

def self.description
  'Update git config details'
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


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

def self.is_supported?(platform)
  true
end

.run(params) ⇒ Object



4
5
6
7
8
# 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]}'")
  sh("git config --global user.email '[email protected]'")
end