Class: Unwrappr::Github::PrSink
- Inherits:
-
Object
- Object
- Unwrappr::Github::PrSink
- Defined in:
- lib/unwrappr/github/pr_sink.rb
Overview
Saves Gemfile.lock annotations as Github pull request comments.
Implements the ‘annotation_sink` interface as defined by the LockFileAnnotator.
Instance Method Summary collapse
- #annotate_change(gem_change, message) ⇒ Object
-
#initialize(repo, pr_number, client) ⇒ PrSink
constructor
A new instance of PrSink.
Constructor Details
#initialize(repo, pr_number, client) ⇒ PrSink
Returns a new instance of PrSink.
10 11 12 13 14 |
# File 'lib/unwrappr/github/pr_sink.rb', line 10 def initialize(repo, pr_number, client) @repo = repo @pr_number = pr_number @client = client end |
Instance Method Details
#annotate_change(gem_change, message) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/unwrappr/github/pr_sink.rb', line 16 def annotate_change(gem_change, ) @client.create_pull_request_comment( @repo, @pr_number, , gem_change.sha, gem_change.filename, gem_change.line_number ) end |