class Changelog::Notifier::GitCommitAuthorFetcher

Fetches a Git commit author from the current commit.

Public Class Methods

fetch(options = {}) click to toggle source
# File lib/changelog/notifier/git_commit_author_fetcher.rb, line 11
def self.fetch(options = {})
  output = options[:capistrano].capture(
    "git --git-dir=#{options[:path] || '.'} log -1 --pretty=format:'%an'"
  )

  return nil if output.empty?

  output.gsub(/(^\'|'$)/, '')
end