Add Request Review functions (list, create, remove)#36
Conversation
Codecov Report
@@ Coverage Diff @@
## master #36 +/- ##
============================================
+ Coverage 65.80% 67.95% +2.15%
- Complexity 176 188 +12
============================================
Files 30 32 +2
Lines 731 752 +21
Branches 29 29
============================================
+ Hits 481 511 +30
+ Misses 229 220 -9
Partials 21 21
Continue to review full report at Codecov.
|
henriquetruta
left a comment
There was a problem hiding this comment.
Thanks for your PR! A few suggestions inline
| public CompletableFuture<Void> removeRequestedReview(final int number, final RequestReviewParameters properties) { | ||
| final String path = String.format(PR_REVIEW_REQUESTS_TEMPLATE, owner, repo, number); | ||
| final String jsonPayload = github.json().toJsonUnchecked(properties); | ||
| log.debug("Requesting reviews for PR: " + path); |
There was a problem hiding this comment.
this comment seems to have been copied from the one above
| log.debug("Fetching pull requests from " + path); | ||
| return github.request(path, LIST_PR_TYPE_REFERENCE); | ||
| } | ||
|
|
There was a problem hiding this comment.
minor: unnecessary new lines
| * @param properties properties for reviewing the PR, such as reviewers and team_reviewers. | ||
| * @see "https://docs.github.com/en/rest/reference/pulls#request-reviewers-for-a-pull-request" | ||
| */ | ||
| public CompletableFuture<Void> removeRequestedReview(final int number, final RequestReviewParameters properties) { |
There was a problem hiding this comment.
it'd be nice to add a test for this case, so we can get the new top-level delete(path, jsonPayload) method tested as well
|
Thank you @henriquetruta. I've fixed your comments and extended the testing somewhat. |
henriquetruta
left a comment
There was a problem hiding this comment.
Thanks for addressing the comments!
Extend PullRequestClient with methods for listing, creating and removing requested reviews.
Can reach out using viktorg@spotify.com