Sha256: ef43e12487616b04b941d946e667239da48c97020a9a0e159d159b1c27ef14a0

Contents?: true

Size: 1.57 KB

Versions: 54

Compression:

Stored size: 1.57 KB

Contents

module Fastlane
  module Actions
    class LastGitCommitAction < Action
      def self.run(params)
        Actions.last_git_commit_dict
      end

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

      def self.description
        "Return last git commit hash, abbreviated commit hash, commit message and author"
      end

      def self.return_value
        "Returns the following dict: {commit_hash: \"commit hash\", abbreviated_commit_hash: \"abbreviated commit hash\" author: \"Author\", author_email: \"author email\", message: \"commit message\"}"
      end

      def self.return_type
        :hash_of_strings
      end

      def self.author
        "ngutman"
      end

      def self.is_supported?(platform)
        true
      end

      def self.example_code
        [
          'commit = last_git_commit
          pilot(changelog: commit[:message]) # message of commit
          author = commit[:author] # author of the commit
          author_email = commit[:author_email] # email of the author of the commit
          hash = commit[:commit_hash] # long sha of commit
          short_hash = commit[:abbreviated_commit_hash] # short sha of commit'
        ]
      end

      def self.category
        :source_control
      end

      def self.sample_return_value
        {
          message: "message",
          author: "author",
          author_email: "author_email",
          commit_hash: "commit_hash",
          abbreviated_commit_hash: "short_hash"
        }
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 4 rubygems

Version Path
fastlane-2.225.0 fastlane/lib/fastlane/actions/last_git_commit.rb
fastlane-2.224.0 fastlane/lib/fastlane/actions/last_git_commit.rb
fastlane-2.223.1 fastlane/lib/fastlane/actions/last_git_commit.rb
fastlane-2.223.0 fastlane/lib/fastlane/actions/last_git_commit.rb
fastlane-2.222.0 fastlane/lib/fastlane/actions/last_git_commit.rb
fastlane-2.221.1 fastlane/lib/fastlane/actions/last_git_commit.rb
fastlane-2.221.0 fastlane/lib/fastlane/actions/last_git_commit.rb
fastlane-2.220.0 fastlane/lib/fastlane/actions/last_git_commit.rb
fastlane-2.219.0 fastlane/lib/fastlane/actions/last_git_commit.rb
fastlane-2.218.0 fastlane/lib/fastlane/actions/last_git_commit.rb
fastlane-security-patched-2.216.0 fastlane/lib/fastlane/actions/last_git_commit.rb
fastlane-2.217.0 fastlane/lib/fastlane/actions/last_git_commit.rb
fastlane-2.216.0 fastlane/lib/fastlane/actions/last_git_commit.rb
fastlane-2.215.1 fastlane/lib/fastlane/actions/last_git_commit.rb
fastlane-2.215.0 fastlane/lib/fastlane/actions/last_git_commit.rb
fastlane-mercafacil-2.214.0 fastlane/lib/fastlane/actions/last_git_commit.rb
fastlane-2.214.0 fastlane/lib/fastlane/actions/last_git_commit.rb
fastlane-2.213.0 fastlane/lib/fastlane/actions/last_git_commit.rb
fastlane-2.212.2 fastlane/lib/fastlane/actions/last_git_commit.rb
fastlane_pricing_fix-2.212.1 fastlane/lib/fastlane/actions/last_git_commit.rb