-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ListOptions to GetCommit and CompareCommits to support pagination #1960
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @Saaarah.
Please make sure to run unit tests before submitting PRs.
You will need to modify the unit tests since the API has changed with this PR.
Please check out surrounding tests to see how pagination is also tested. Thanks.
Hi Glenn, thanks for reviewing my pull request and I've added the new parameters in the two API's unit tests. Thanks again! |
Hi @Saaarah - it looks like there are some calls to these APIs in the examples, if you could please take a look and fix them. Here is the error:
|
Hi Glenn, I've fixed the example. Sorry for not updating all affected code, it'll be nice to have a small section in readme.md to ask contributors to run all necessary tests prior to creating pull request, which will be really helpful for first timer contributors. |
This is already covered in our CONTRIBUTING.md doc:
|
It now looks like
|
Ah thanks for pointing out! I've formatted the file and run all the commands listed above. Thanks Glenn! |
Codecov Report
@@ Coverage Diff @@
## master #1960 +/- ##
=======================================
Coverage 97.84% 97.84%
=======================================
Files 105 105
Lines 6809 6815 +6
=======================================
+ Hits 6662 6668 +6
Misses 80 80
Partials 67 67
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @Saaarah !
LGTM.
Awaiting second LGTM before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
go-github released the Go client library to [38.1.0][1] recently. API changes includes: * Add ListOptions required by GetCommit method. As described in change[2] * Add followRedirects required by GetBranch method and set it to false as start point. As described in change[3] [1]: https://github.com/google/go-github/releases/tag/v38.1.0 [2]: google/go-github#1960 [3]: google/go-github#1901
go-github released the Go client library to [38.1.0][1] recently. API changes includes: * Add ListOptions required by GetCommit method. As described in change[2] * Add followRedirects required by GetBranch method and set it to false as start point. As described in change[3] [1]: https://github.com/google/go-github/releases/tag/v38.1.0 [2]: google/go-github#1960 [3]: google/go-github#1901
go-github released the Go client library to [38.1.0][1] recently. API changes includes: * Add ListOptions required by GetCommit method. As described in change[2] * Add followRedirects required by GetBranch method and set it to false as start point. As described in change[3] [1]: https://github.com/google/go-github/releases/tag/v38.1.0 [2]: google/go-github#1960 [3]: google/go-github#1901
* google/go-github#1960 * https://docs.github.com/en/rest/reference/repos#get-a-commit > Note: If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. > Each page contains the static commit information, and the only changes are to the file listing.
No description provided.