Class: Tracker::Git
- Inherits:
-
Object
- Object
- Tracker::Git
- Defined in:
- lib/pivotal-git-tracker/git.rb
Instance Method Summary collapse
Instance Method Details
#contains?(message, options = {}) ⇒ Boolean
3 4 5 6 7 8 |
# File 'lib/pivotal-git-tracker/git.rb', line 3 def contains?(, = {}) branch = .fetch(:branch, 'HEAD') remote_branch = [:remote_branch] result = `git log #{[remote_branch, branch].compact.join('..')} --grep='#{}'` result.length > 0 end |
#latest_log(options = {}) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/pivotal-git-tracker/git.rb', line 10 def latest_log( = {}) branch = .fetch(:branch, 'HEAD') remote_branch = [:remote_branch] commits = `git log -n 50 #{[remote_branch, branch].compact.join('..')} --grep='#' --oneline` commits.scan(/#([0-9]{9})/).flatten end |