Uh oh!
There was an error while loading. Please reload this page.
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. |
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @alinbalutoiu !
Before line 587 of copilot_test.go, could you please change those lines from:
testBadOptions(t, methodName, func() (errerror) {
_, _, err=client.Copilot.ListCopilotSeats(ctx, "\n", nil)to:
opts:=&ListOptions{Page: 2}
testBadOptions(t, methodName, func() (errerror) {
_, _, err=client.Copilot.ListCopilotSeats(ctx, "\n", opts)That should fix our code coverage problem.
alinbalutoiu
commented
Mar 26, 2024
Thank you @gmlewis, I missed that initially. Fixed it! |
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @alinbalutoiu !
LGTM.
Merging.
alinbalutoiu
commented
Mar 26, 2024
@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. |
gmlewis
commented
Mar 26, 2024
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.