Handle paginated pull request lookups #1

Merged
stephen merged 1 commit from fix-paginated-pr-lookup into main 2026-06-08 05:12:14 +00:00
Owner

When a repository has more than one page of open pull requests, the action only inspected the first page before deciding whether to create a new PR. That could create a duplicate PR for the same head branch if the existing one appeared later in Forgejo pagination.

This switches existing PR lookup to the existing API paginator, and applies the same pagination handling to label lookup. The regression test covers an existing PR returned on the second page.

Tested with make all.

When a repository has more than one page of open pull requests, the action only inspected the first page before deciding whether to create a new PR. That could create a duplicate PR for the same head branch if the existing one appeared later in Forgejo pagination. This switches existing PR lookup to the existing API paginator, and applies the same pagination handling to label lookup. The regression test covers an existing PR returned on the second page. Tested with `make all`.
Handle paginated pull request lookups
All checks were successful
test / unit (pull_request) Successful in 5s
53edbf95e4
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rasterstate/create-pull-request-action!1
No description provided.