Class: PrChangelog::GitProxy
- Inherits:
-
Object
- Object
- PrChangelog::GitProxy
- Defined in:
- lib/pr_changelog/git_proxy.rb
Overview
A boundary class between git and the rest of the gem
Constant Summary collapse
- LOG_FORMAT =
'- %cn: %s%n%w(80, 2, 2)%b'
Instance Method Summary collapse
- #commits_between(base_ref, current_ref) ⇒ Object
- #git_tags_list ⇒ Object
- #merge_commits_between(base_ref, current_ref) ⇒ Object
Instance Method Details
#commits_between(base_ref, current_ref) ⇒ Object
8 9 10 |
# File 'lib/pr_changelog/git_proxy.rb', line 8 def commits_between(base_ref, current_ref) `git log #{base_ref}..#{current_ref} --format='#{LOG_FORMAT}'` end |
#git_tags_list ⇒ Object
16 17 18 |
# File 'lib/pr_changelog/git_proxy.rb', line 16 def `git tag --list`.split("\n") end |
#merge_commits_between(base_ref, current_ref) ⇒ Object
12 13 14 |
# File 'lib/pr_changelog/git_proxy.rb', line 12 def merge_commits_between(base_ref, current_ref) `git log --merges #{base_ref}..#{current_ref} --format='#{LOG_FORMAT}'` end |