Sha256: 8f6a950c059d6d9582c6dfdfed7f7281507990a050dc9ff0a35bdcbaab6643a8

Contents?: true

Size: 1.5 KB

Versions: 1

Compression:

Stored size: 1.5 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

1 entries across 1 versions & 1 rubygems

Version Path
fastlane_hotfix-2.187.0 fastlane/lib/fastlane/actions/git_remote_branch.rb