Closed ryan-williams closed 2 weeks ago
Description
Steps to reproduce
Here's a repro in GitHub Actions:
Simple attempt to use keyset pagination in Repositories.allRepositoryTrees isn't working:
Repositories.allRepositoryTrees
import { Gitlab } from "@gitbeaker/rest" const gl = new Gitlab({ token: "" }) const page = await gl.Repositories.allRepositoryTrees( "hudcostreets/ctbk.dev", { pagination: "keyset", perPage: 5, } ) console.log(`${page.length} items:`) console.log(page)
Returns 22 items (despite perPage: 5), and no pagination info.
perPage: 5
"keyset" is the only pagination method supported in Repositories.allRepositoryTrees, so I'm unable to page through results at all.
Expected behaviour
Return 5 items, and some sort of cursor or callback to fetch more
Actual behaviour
Returns array of 22 items, no pagination info.
Checklist
I realized the various GitBeaker all* APIs are automatically fetching all "pages" of results from GitLab.
all*
I was confused by a corner-case related to fetching top-level groups: #3603.
Description
Steps to reproduce
Here's a repro in GitHub Actions:
Simple attempt to use keyset pagination in
Repositories.allRepositoryTrees
isn't working:Returns 22 items (despite
perPage: 5
), and no pagination info."keyset" is the only pagination method supported in
Repositories.allRepositoryTrees
, so I'm unable to page through results at all.Expected behaviour
Return 5 items, and some sort of cursor or callback to fetch more
Actual behaviour
Returns array of 22 items, no pagination info.
Checklist