Class: AgileNotifier::Git::Repository

Inherits:
SCM::Repository show all
Defined in:
lib/agile_notifier/git.rb

Instance Attribute Summary

Attributes inherited from SCM::Repository

#repo, #url, #user

Instance Method Summary collapse

Methods inherited from SCM::Repository

#get_commit

Constructor Details

#initialize(repo) ⇒ Repository

Returns a new instance of Repository.



26
27
28
# File 'lib/agile_notifier/git.rb', line 26

def initialize(repo)
  @repo = repo
end

Instance Method Details

#get_committer_of_a_commit(revision) ⇒ Object



30
31
32
33
34
35
# File 'lib/agile_notifier/git.rb', line 30

def get_committer_of_a_commit(revision)
  go_to_repo = "cd #{@repo}"
  show_author_name = "git show #{revision} --pretty=format:%an | head -1"
  cmd = Git.combine_commands(go_to_repo, show_author_name)
  Git.run_command(cmd).chomp
end