class Fastlane::Actions::GitAuthorsAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/git_authors/actions/git_authors_action.rb, line 17
def self.authors
  ["Viktor Rutberg"]
end
available_options() click to toggle source
# File lib/fastlane/plugin/git_authors/actions/git_authors_action.rb, line 30
def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :prefix,
                            env_name: "GIT_AUTHORS_PREFIX",
                         description: "A prefix for the list of authors",
                            optional: true,
                                type: String),

    FastlaneCore::ConfigItem.new(key: :suffix,
                            env_name: "GIT_AUTHORS_SUFFIX",
                         description: "A suffix for the list of authors",
                            optional: true,
                                type: String)
  ]
end
description() click to toggle source
# File lib/fastlane/plugin/git_authors/actions/git_authors_action.rb, line 13
def self.description
  "List all authors of a Git repository"
end
details() click to toggle source
# File lib/fastlane/plugin/git_authors/actions/git_authors_action.rb, line 25
def self.details
  # Optional:
  "This plugin gives you a list of all authors of a Git repository with an optional prefix and an optional suffix"
end
is_supported?(platform) click to toggle source
# File lib/fastlane/plugin/git_authors/actions/git_authors_action.rb, line 46
def self.is_supported?(platform)
  # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
  # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
  #
  # [:ios, :mac, :android].include?(platform)
  true
end
return_value() click to toggle source
# File lib/fastlane/plugin/git_authors/actions/git_authors_action.rb, line 21
def self.return_value
  # If your method provides a return value, you can describe here what it does
end
run(params) click to toggle source
# File lib/fastlane/plugin/git_authors/actions/git_authors_action.rb, line 4
def self.run(params)
  prefix = params[:prefix] == nil ? "Made with ❤️  by" : params[:prefix]
  suffix = params[:suffix] == nil ? "" : params[:suffix]

  output = Actions.sh("git log --format='%aN' | sort | uniq")

  UI.message([prefix, output.split("\n").join(", "), suffix].join(" "))
end