Method: Licensed::Git.commit_date

Defined in:
lib/licensed/git.rb

.commit_date(sha) ⇒ Object

Returns the commit date for the provided SHA as a timestamp

sha - commit sha to retrieve date



36
37
38
39
# File 'lib/licensed/git.rb', line 36

def commit_date(sha)
  return unless git_repo? && sha
  Licensed::Shell.execute("git", "show", "-s", "-1", "--format=%ct", sha)
end