Skip to content

feat: list pull requests for repository backfill - #62

Merged
tbhb-agent merged 1 commit into
mainfrom
gm-backfill-list
Nov 16, 2026
Merged

tbhb-agent merged 1 commit into
mainfrom
gm-backfill-list

Conversation

@tbhb-agent

Copy link
Copy Markdown
Collaborator

Why

Backfill of earlier pull requests needs a reader that lists a repository's pull requests in creation order under the shared request budget. This change adds that first step as a package with no caller yet.

Behavior change

The new internal/backfill package adds List. It reads /repos/<repo>/pulls?state=all&sort=created&direction=asc&per_page=100 through the shared client at the lowest budget priority, and follows the next-page links. Each record keeps the number, state, draft flag, creation, merge and close times, head SHA, and base ref. A positive MaxRequests caps the page reads. A capped run sets Truncated and returns the URL of the next page. A zero or negative cap returns ErrMaxRequests. A 304 response ends the run. The service doesn't call List yet.

Verification

bazelisk test //..., go vet ./... and go test ./... exit 0. The tests cover paging, the cap and next-page URL, the invalid cap, a 304 response, and a decode failure.

Opened-by: LLM effort=medium;harness=claude-code:2.1.325;model=anthropic:claude-sonnet-5-5;session=sha-256-64:6507fa80a17e0653;surface=cli
Generated-by: LLM effort=high;harness=codex:0.164.0;model=openai:gpt-6.1-sol;session=sha-256-64:e3ba5e0494e132ff;surface=exec
Assisted-by: LLM effort=medium;harness=claude-code:2.1.325;model=anthropic:claude-sonnet-5-5;session=sha-256-64:6507fa80a17e0653;surface=cli

Generated-by: LLM effort=high;harness=codex:0.164.0;model=openai:gpt-6.1-sol;session=sha-256-64:e3ba5e0494e132ff;surface=exec
@tbhb-agent
tbhb-agent merged commit a5f2720 into main Nov 16, 2026
8 checks passed
@tbhb-agent
tbhb-agent deleted the gm-backfill-list branch November 16, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant