Class: AutoReleaseNote::GitLog
- Inherits:
-
Object
- Object
- AutoReleaseNote::GitLog
- Defined in:
- lib/auto_release_note/git_log.rb
Instance Attribute Summary collapse
-
#issues ⇒ Object
readonly
Returns the value of attribute issues.
-
#logs ⇒ Object
readonly
Returns the value of attribute logs.
Instance Method Summary collapse
-
#initialize(tag_query) ⇒ GitLog
constructor
A new instance of GitLog.
- #repositories ⇒ Object
- #repository(username) ⇒ Object
Constructor Details
#initialize(tag_query) ⇒ GitLog
Returns a new instance of GitLog.
7 8 9 10 11 12 13 |
# File 'lib/auto_release_note/git_log.rb', line 7 def initialize(tag_query) @logs = [] @issues = [] @git = Git.open(Dir.pwd) parse_merge_log(get_merge_log(tag_query)) get_issue end |
Instance Attribute Details
#issues ⇒ Object (readonly)
Returns the value of attribute issues.
5 6 7 |
# File 'lib/auto_release_note/git_log.rb', line 5 def issues @issues end |
#logs ⇒ Object (readonly)
Returns the value of attribute logs.
5 6 7 |
# File 'lib/auto_release_note/git_log.rb', line 5 def logs @logs end |
Instance Method Details
#repositories ⇒ Object
19 20 21 |
# File 'lib/auto_release_note/git_log.rb', line 19 def repositories @git.remotes.map {|remote| remote.url.gsub(/.git$/, '') } end |
#repository(username) ⇒ Object
15 16 17 |
# File 'lib/auto_release_note/git_log.rb', line 15 def repository(username) repositories.find {|url| url.include?(username) } end |