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
96 97 98 99 |
# File 'lib/octokit/client/reviews.rb', line 96 def create_pull_request_review(repo, id, = {}) = ensure_api_media_type(:reviews, ) post "#{Repository.path repo}/pulls/#{id}/reviews", end |
#delete_pull_request_review(repo, number, review, options = {}) ⇒ Sawyer::Resource
Delete a pending review
51 52 53 54 |
# File 'lib/octokit/client/reviews.rb', line 51 def delete_pull_request_review(repo, number, review, = {}) = ensure_api_media_type(:reviews, ) 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
135 136 137 138 139 |
# File 'lib/octokit/client/reviews.rb', line 135 def dismiss_pull_request_review(repo, number, review, , = {}) = .merge(message: ) = ensure_api_media_type(:reviews, ) put "#{Repository.path repo}/pulls/#{number}/reviews/#{review}/dismissals", end |
#pull_request_review(repo, number, review, options = {}) ⇒ Sawyer::Resource
Get a single review
35 36 37 38 |
# File 'lib/octokit/client/reviews.rb', line 35 def pull_request_review(repo, number, review, = {}) = ensure_api_media_type(:reviews, ) 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
67 68 69 70 |
# File 'lib/octokit/client/reviews.rb', line 67 def pull_request_review_comments(repo, number, review, = {}) = ensure_api_media_type(:reviews, ) get "#{Repository.path repo}/pulls/#{number}/reviews/#{review}/comments", end |
#pull_request_review_requests(repo, id, options = {}) ⇒ Array<Sawyer::Resource>
List review requests
151 152 153 154 |
# File 'lib/octokit/client/reviews.rb', line 151 def pull_request_review_requests(repo, id, = {}) = ensure_api_media_type(:reviews, ) get "#{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 22 |
# File 'lib/octokit/client/reviews.rb', line 19 def pull_request_reviews(repo, id, = {}) = ensure_api_media_type(:reviews, ) get "#{Repository.path repo}/pulls/#{id}/reviews", end |
#request_pull_request_review(repo, id, reviewers, options = {}) ⇒ Sawyer::Resource
Create a review request
167 168 169 170 171 |
# File 'lib/octokit/client/reviews.rb', line 167 def request_pull_request_review(repo, id, reviewers, = {}) = .merge(reviewers: reviewers) = ensure_api_media_type(:reviews, ) 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
117 118 119 120 121 |
# File 'lib/octokit/client/reviews.rb', line 117 def submit_pull_request_review(repo, number, review, event, = {}) = .merge(event: event) = ensure_api_media_type(:reviews, ) post "#{Repository.path repo}/pulls/#{number}/reviews/#{review}/events", end |