fix(ploeg): read every page of Forgejo pull requests and GitLab checks #150
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ryangr0/ploeg-forge-pagination"
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?
The worker asked Forgejo for one page of 50 open pull requests, so a
Run's pull request beyond the first page looked absent: a writer could
open a duplicate and a successful Run could be recorded as no change.
The GitLab provider read one page of 100 commit statuses, so a failed or
pending check on page two was reported as a successful commit, although
CommitStatusReader promises the combined state of every check.
The Forgejo lookup now pages until it finds the Run's pull request or
has seen every open one, using X-Total-Count when the forge sends it and
a short or empty page otherwise. It stops at 20 pages and reports an
error rather than a missing pull request. GitLab commit status follows
X-Next-Page (or a full page when the header is absent) up to 50 pages,
keeps the newest status per check name, and fails the whole read when
any page fails, so a partial read never becomes a success.
Forgejo has no head-branch filter on the list endpoint, so the lookup pages (X-Total-Count or short page ends it, cap 20 pages = error). Known gap: worker.go still logs a lookup error and carries on with no PR URL; making that an infra/stuck outcome belongs to VIK-1732.
Verified with
mise run verifyon the pinned toolchain (all gates passed).Ticket: https://vikunja.webgrip.dev/tasks/1752
🤖 Generated with Claude Code