Class: Fastlane::Actions::LastGitCommitAction

Inherits:
Fastlane::Action show all
Defined in:
fastlane/lib/fastlane/actions/last_git_commit.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, authors, available_options, deprecated_notes, details, lane_context, method_missing, other_action, output, shell_out_should_use_bundle_exec?, step_text

Class Method Details

.authorObject


24
25
26
# File 'fastlane/lib/fastlane/actions/last_git_commit.rb', line 24

def self.author
  "ngutman"
end

.categoryObject


43
44
45
# File 'fastlane/lib/fastlane/actions/last_git_commit.rb', line 43

def self.category
  :source_control
end

.descriptionObject


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

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

.example_codeObject


32
33
34
35
36
37
38
39
40
41
# File 'fastlane/lib/fastlane/actions/last_git_commit.rb', line 32

def self.example_code
  [
    'commit = last_git_commit
    crashlytics(notes: 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

.is_supported?(platform) ⇒ Boolean

Returns:


28
29
30
# File 'fastlane/lib/fastlane/actions/last_git_commit.rb', line 28

def self.is_supported?(platform)
  true
end

.return_typeObject


20
21
22
# File 'fastlane/lib/fastlane/actions/last_git_commit.rb', line 20

def self.return_type
  :hash_of_strings
end

.return_valueObject


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

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

.run(params) ⇒ Object


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

def self.run(params)
  Actions.last_git_commit_dict
end

.sample_return_valueObject


47
48
49
50
51
52
53
54
55
# File 'fastlane/lib/fastlane/actions/last_git_commit.rb', line 47

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