Sha256: d946b253e09f0fb30b609b45c3aa2f51a58a2712ee53ebdda31e43bf0ab8b18e

Contents?: true

Size: 1.09 KB

Versions: 7

Compression:

Stored size: 1.09 KB

Contents

module Pantograph
  module Actions
    module SharedValues
      GIT_BRANCH_NAME = :GIT_BRANCH_NAME
    end

    class GitBranchAction < Action
      def self.run(params)
        Actions.lane_context[SharedValues::GIT_BRANCH_NAME] = Helper::Git.current_branch
      end

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

      def self.description
        'Returns the name of the current git branch'
      end

      def self.details
        'If no branch could be found, this action will return an empty string'
      end

      def self.available_options
        []
      end

      def self.output
        [
          ['GIT_BRANCH_NAME', 'The git branch name']
        ]
      end

      def self.authors
        ['johnknapprs']
      end

      def self.is_supported?(platform)
        true
      end

      def self.example_code
        [
          'git_branch'
        ]
      end

      def self.return_type
        :string
      end

      def self.category
        :source_control
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pantograph-0.1.22 pantograph/lib/pantograph/actions/git_branch.rb
pantograph-0.1.21 pantograph/lib/pantograph/actions/git_branch.rb
pantograph-0.1.20 pantograph/lib/pantograph/actions/git_branch.rb
pantograph-0.1.19 pantograph/lib/pantograph/actions/git_branch.rb
pantograph-0.1.17 pantograph/lib/pantograph/actions/git_branch.rb
pantograph-0.1.16 pantograph/lib/pantograph/actions/git_branch.rb
pantograph-0.1.15 pantograph/lib/pantograph/actions/git_branch.rb