Class: Fastlane::Actions::GitRemoteBranchAction

Inherits:
Fastlane::Action show all
Defined in:
fastlane/lib/fastlane/actions/git_remote_branch.rb

Constant Summary

Constants inherited from Fastlane::Action

Fastlane::Action::AVAILABLE_CATEGORIES, Fastlane::Action::RETURN_TYPES

Documentation collapse

Class Method Summary collapse

Methods inherited from Fastlane::Action

action_name, author, deprecated_notes, lane_context, method_missing, other_action, return_value, sample_return_value, shell_out_should_use_bundle_exec?, step_text

Class Method Details

.authorsObject



33
34
35
# File 'fastlane/lib/fastlane/actions/git_remote_branch.rb', line 33

def self.authors
  ["SeanMcNeil"]
end

.available_optionsObject



20
21
22
23
24
25
26
27
# File 'fastlane/lib/fastlane/actions/git_remote_branch.rb', line 20

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :remote_name,
                                 env_name: "FL_REMOTE_REPOSITORY_NAME",
                                 description: "The remote repository to check",
                                 optional: true)
  ]
end

.categoryObject



52
53
54
# File 'fastlane/lib/fastlane/actions/git_remote_branch.rb', line 52

def self.category
  :source_control
end

.descriptionObject



12
13
14
# File 'fastlane/lib/fastlane/actions/git_remote_branch.rb', line 12

def self.description
  "Returns the name of the current git remote default branch"
end

.detailsObject



16
17
18
# File 'fastlane/lib/fastlane/actions/git_remote_branch.rb', line 16

def self.details
  "If no default remote branch could be found, this action will return nil. This is a wrapper for the internal action Actions.git_default_remote_branch_name"
end

.example_codeObject



41
42
43
44
45
46
# File 'fastlane/lib/fastlane/actions/git_remote_branch.rb', line 41

def self.example_code
  [
    'git_remote_branch # Query git for first available remote name',
    'git_remote_branch(remote_name:"upstream") # Provide a remote name'
  ]
end

.is_supported?(platform) ⇒ Boolean

Returns:



37
38
39
# File 'fastlane/lib/fastlane/actions/git_remote_branch.rb', line 37

def self.is_supported?(platform)
  true
end

.outputObject



29
30
31
# File 'fastlane/lib/fastlane/actions/git_remote_branch.rb', line 29

def self.output
  []
end

.return_typeObject



48
49
50
# File 'fastlane/lib/fastlane/actions/git_remote_branch.rb', line 48

def self.return_type
  :string
end

.run(params) ⇒ Object



4
5
6
# File 'fastlane/lib/fastlane/actions/git_remote_branch.rb', line 4

def self.run(params)
  Actions.git_remote_branch_name(params[:remote_name])
end