-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix pagination for ListCopilotSeats #3112
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3112 +/- ##
==========================================
- Coverage 97.72% 92.87% -4.85%
==========================================
Files 153 170 +17
Lines 13390 11410 -1980
==========================================
- Hits 13085 10597 -2488
- Misses 215 723 +508
Partials 90 90 ☔ View full report in Codecov by Sentry. |
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, @alinbalutoiu !
Before line 587 of copilot_test.go
, could you please change those lines from:
testBadOptions(t, methodName, func() (err error) {
_, _, err = client.Copilot.ListCopilotSeats(ctx, "\n", nil)
to:
opts := &ListOptions{Page: 2}
testBadOptions(t, methodName, func() (err error) {
_, _, err = client.Copilot.ListCopilotSeats(ctx, "\n", opts)
That should fix our code coverage problem.
Thank you @gmlewis, I missed that initially. Fixed it! |
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, @alinbalutoiu !
LGTM.
Merging.
@gmlewis do you know when this will make into a release version? It would be super helpful to be able to pull a specific version of the library with this fix. |
You can always pull in a specific version using the commit hash: Otherwise, we try to release this repo approximately monthly which would be in a couple-ish weeks. |
The pagination must be passed as query parameters instead of request body according to the docs.
Currently this is silently failing but the pagination is broken if you've got lots of Copilot users.