Class: Octy::Core
- Inherits:
-
Object
- Object
- Octy::Core
- Defined in:
- lib/octy/core.rb
Instance Method Summary collapse
- #changelog(repo, from, to) ⇒ Object
-
#initialize ⇒ Core
constructor
A new instance of Core.
Constructor Details
#initialize ⇒ Core
Returns a new instance of Core.
8 9 10 11 12 13 |
# File 'lib/octy/core.rb', line 8 def initialize = { access_token: ENV['GITHUB_ACCESS_TOKEN'] } @client = Octokit::Client.new() end |
Instance Method Details
#changelog(repo, from, to) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/octy/core.rb', line 15 def changelog(repo, from, to) comparison = @client.compare(repo, from, to) commits = comparison.commits.reverse commits.map do |commit| = commit.commit. if is_merge_pr?() pr_id = get_pr_id() pr = @client.pull_request(repo, pr_id) Printer.output(pr) if !pr.nil? end end end |