Module: Octokit::Client::Reviews
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/reviews.rb
Overview
Methods for the Reviews API
Instance Method Summary collapse
-
#create_pull_request_review(repo, id, options = {}) ⇒ Sawyer::Resource
Create a pull request review.
-
#delete_pull_request_review(repo, number, review, options = {}) ⇒ Sawyer::Resource
Delete a pending review.
-
#dismiss_pull_request_review(repo, number, review, message, options = {}) ⇒ Sawyer::Resource
Dismiss a pull request review.
-
#pull_request_review(repo, number, review, options = {}) ⇒ Sawyer::Resource
Get a single review.
-
#pull_request_review_comments(repo, number, review, options = {}) ⇒ Array<Sawyer::Resource>
Get comments for a single review.
-
#pull_request_review_requests(repo, id, options = {}) ⇒ Array<Sawyer::Resource>
List review requests.
-
#pull_request_reviews(repo, id, options = {}) ⇒ Array<Sawyer::Resource>
List reviews on a pull request.
-
#request_pull_request_review(repo, id, reviewers, options = {}) ⇒ Sawyer::Resource
Create a review request.
-
#submit_pull_request_review(repo, number, review, event, options = {}) ⇒ Sawyer::Resource
Submit a pull request review.
Instance Method Details
#create_pull_request_review(repo, id, options = {}) ⇒ Sawyer::Resource
Create a pull request review
92 93 94 |
# File 'lib/octokit/client/reviews.rb', line 92 def create_pull_request_review(repo, id, = {}) post "#{Repository.path repo}/pulls/#{id}/reviews", end |
#delete_pull_request_review(repo, number, review, options = {}) ⇒ Sawyer::Resource
Delete a pending review
49 50 51 |
# File 'lib/octokit/client/reviews.rb', line 49 def delete_pull_request_review(repo, number, review, = {}) delete "#{Repository.path repo}/pulls/#{number}/reviews/#{review}", end |
#dismiss_pull_request_review(repo, number, review, message, options = {}) ⇒ Sawyer::Resource
Dismiss a pull request review
129 130 131 132 |
# File 'lib/octokit/client/reviews.rb', line 129 def dismiss_pull_request_review(repo, number, review, , = {}) = .merge(message: ) put "#{Repository.path repo}/pulls/#{number}/reviews/#{review}/dismissals", end |
#pull_request_review(repo, number, review, options = {}) ⇒ Sawyer::Resource
Get a single review
34 35 36 |
# File 'lib/octokit/client/reviews.rb', line 34 def pull_request_review(repo, number, review, = {}) get "#{Repository.path repo}/pulls/#{number}/reviews/#{review}", end |
#pull_request_review_comments(repo, number, review, options = {}) ⇒ Array<Sawyer::Resource>
Get comments for a single review
64 65 66 |
# File 'lib/octokit/client/reviews.rb', line 64 def pull_request_review_comments(repo, number, review, = {}) paginate "#{Repository.path repo}/pulls/#{number}/reviews/#{review}/comments", end |
#pull_request_review_requests(repo, id, options = {}) ⇒ Array<Sawyer::Resource>
List review requests
144 145 146 |
# File 'lib/octokit/client/reviews.rb', line 144 def pull_request_review_requests(repo, id, = {}) paginate "#{Repository.path repo}/pulls/#{id}/requested_reviewers", end |
#pull_request_reviews(repo, id, options = {}) ⇒ Array<Sawyer::Resource>
List reviews on a pull request
19 20 21 |
# File 'lib/octokit/client/reviews.rb', line 19 def pull_request_reviews(repo, id, = {}) paginate "#{Repository.path repo}/pulls/#{id}/reviews", end |
#request_pull_request_review(repo, id, reviewers, options = {}) ⇒ Sawyer::Resource
Create a review request
159 160 161 162 |
# File 'lib/octokit/client/reviews.rb', line 159 def request_pull_request_review(repo, id, reviewers, = {}) = .merge(reviewers: reviewers) post "#{Repository.path repo}/pulls/#{id}/requested_reviewers", end |
#submit_pull_request_review(repo, number, review, event, options = {}) ⇒ Sawyer::Resource
Submit a pull request review
112 113 114 115 |
# File 'lib/octokit/client/reviews.rb', line 112 def submit_pull_request_review(repo, number, review, event, = {}) = .merge(event: event) post "#{Repository.path repo}/pulls/#{number}/reviews/#{review}/events", end |