Method: Command::WriteCommit#current_author

Defined in:
lib/command/shared/write_commit.rb

#current_authorObject



71
72
73
74
75
76
77
78
79
# File 'lib/command/shared/write_commit.rb', line 71

def current_author
  config_name  = repo.config.get(["user", "name"])
  config_email = repo.config.get(["user", "email"])

  name  = @env.fetch("GIT_AUTHOR_NAME", config_name)
  email = @env.fetch("GIT_AUTHOR_EMAIL", config_email)

  Database::Author.new(name, email, Time.now)
end