Repository navigation
feat: list pull requests for repository backfill - #62
Merged
Merged
Conversation
Generated-by: LLM effort=high;harness=codex:0.164.0;model=openai:gpt-6.1-sol;session=sha-256-64:e3ba5e0494e132ff;surface=exec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/backfillpackage addsList. It reads/repos/<repo>/pulls?state=all&sort=created&direction=asc&per_page=100through 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 positiveMaxRequestscaps the page reads. A capped run setsTruncatedand returns the URL of the next page. A zero or negative cap returnsErrMaxRequests. A 304 response ends the run. The service doesn't callListyet.Verification
bazelisk test //...,go vet ./...andgo 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