Paginate forge list and resolver commands #89
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story: So that I can rely on
forgeas repositories grow, list and resolver commands must paginate enough results to find the requested issue, PR, label, or milestone instead of silently missing page-two data.Part of the "Forge / workspace CLI tooling" arc.
Problem
Several
forgelist and lookup paths use fixed API limits or a single page:pr listuseslimit=50.pr find-by-headand branch-name PR resolution uselimit=50and can miss matching branches past the first page.limit=100.--limit, but they still perform one request.This is fine for the current small repos, but it will silently drop data as the issue and PR backlog grows.
Desired Behavior
Add pagination helpers and use them anywhere correctness depends on seeing the full result set.
Minimum scope:
--limitexceeds one API page, or when filtering/searching needs more than the first page.Preserve the existing
-L/--limitUX where it already exists, but fetch enough pages to honor it. For resolver paths, fetch all pages needed to disambiguate or fail clearly.Validation
Fixture tests should prove a match on page 2 is found, a missing target remains missing after all pages, and output still respects the user-facing limit.