Sha256: f0867700f8974d41e96a5df917c13aa9f6230b330d85894e88221499682a4a79

Contents?: true

Size: 1.44 KB

Versions: 64

Compression:

Stored size: 1.44 KB

Contents

module Fastlane
  module Actions
    class GitRemoteBranchAction < Action
      def self.run(params)
        Actions.git_remote_branch_name(params[:remote_name])
      end

      #####################################################
      # @!group Documentation
      #####################################################

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

      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

      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

      def self.output
        []
      end

      def self.authors
        ["SeanMcNeil"]
      end

      def self.is_supported?(platform)
        true
      end

      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

      def self.return_type
        :string
      end

      def self.category
        :source_control
      end
    end
  end
end

Version data entries

64 entries across 64 versions & 4 rubygems

Version Path
fastlane-2.202.0 fastlane/lib/fastlane/actions/git_remote_branch.rb
fastlane-2.201.2 fastlane/lib/fastlane/actions/git_remote_branch.rb
fastlane-2.201.1 fastlane/lib/fastlane/actions/git_remote_branch.rb
fastlane-2.201.0 fastlane/lib/fastlane/actions/git_remote_branch.rb
fastlane-2.201.0.rc3 fastlane/lib/fastlane/actions/git_remote_branch.rb
fastlane-2.201.0.rc2 fastlane/lib/fastlane/actions/git_remote_branch.rb
fastlane-2.201.0.rc1 fastlane/lib/fastlane/actions/git_remote_branch.rb
fastlane-2.200.0 fastlane/lib/fastlane/actions/git_remote_branch.rb
fastlane-2.199.0 fastlane/lib/fastlane/actions/git_remote_branch.rb
fastlane-2.198.1 fastlane/lib/fastlane/actions/git_remote_branch.rb
fastlane-2.198.0 fastlane/lib/fastlane/actions/git_remote_branch.rb
fastlane-2.197.0 fastlane/lib/fastlane/actions/git_remote_branch.rb
fastlane-2.196.0 fastlane/lib/fastlane/actions/git_remote_branch.rb
fastlane-2.195.0 fastlane/lib/fastlane/actions/git_remote_branch.rb
fastlane-2.194.0 fastlane/lib/fastlane/actions/git_remote_branch.rb
fastlane-2.193.1 fastlane/lib/fastlane/actions/git_remote_branch.rb
fastlane-2.193.0 fastlane/lib/fastlane/actions/git_remote_branch.rb
fastlane-2.192.0 fastlane/lib/fastlane/actions/git_remote_branch.rb
fastlane-2.191.0 fastlane/lib/fastlane/actions/git_remote_branch.rb
fastlane-2.190.0 fastlane/lib/fastlane/actions/git_remote_branch.rb