Panel-unanimous batch that was staged unpushed on 57abe15 (#4853):
- forge_timeline: project Forgejo label events into the GitHub shape
so the ruling ladder fires on this forge (measured mapping #4849)
- forge_pr_activity: stop calling /pulls/{n}/comments (404 here); use
reviews with comments_count > 0 for inline comments (#4844)
- ci.yml: install shellcheck before lint, mirroring actionlint — the
act-22.04 runner image does not ship it
Status captured before jq so an unreadable timeline cannot report empty.
2.7 KiB
Added
lib/forge.sh— the forge selector:forge_detectnames the forge from the runner's own environment,forge_clientnames the client it needs, andforge_preflightrefuses loudly before any sweep when the two disagree (#188).- The reconcilers and
labels-scoperun that preflight first, so a GitHub-shaped client on a Forgejo instance is a named refusal instead of a sweep that reads nothing and reports success (#188). lib/closes_references.sh— the closing-keyword parser, sibling ofrefs_references, so "which issues does this PR close" is answered from a PR body rather than from GitHub's GraphQL API (#188).lib/forge-github.shandlib/forge-forgejo.sh— one call surface, two backends, selected byforge_select; no forge branching at the call sites (#188).- The forgejo backend proves each paginated gather complete against the
server's
x-total-countand refuses loudly when it cannot — a missing header is a refusal, not a pass (#188).
Changed
-
issueflow-reconcilegathers open and merged PRs over REST instead ofgh api graphql. Forgejo serves no GraphQL at all, so the two queries were replaced rather than translated; both forges returnnumberandbodyfrom/pullsin the same shape (#188). -
forge_apiowns the page size, because each forge silently ignores the other's parameter:per_page=100reads 30 items on Forgejo andlimit=100reads 30 on GitHub, both HTTP 200. No call site names one (#188). -
Outstanding review requests are derived from the reviews on the current head rather than from
requested_reviewers, which Forgejo never clears — read raw there, a PR would sit atstate:bots-reviewingforever (#188).
Fixed
-
labels-scopeno longer fails to compile its jq program on jq 1.6, which the Forgejo runner image ships:labelis a reserved word in jq's grammar, so$labelis a syntax error there and every scope derivation died before reading the config (#188). -
labels-reconcileandlabels-scopeno longer exit 0 on a Forgejo consumer having read zero facts — measured onheavy-duty/rig, where the sweep printedreconciled.over an empty PR list and scope reported "no labeler.yml" for a file that exists (#188). -
forge_timelineprojects Forgejo's label events (.type/.body/.user.login) into the GitHub shape (.event/.actor.login) so the ruling ladder reads the same board on both forges (#188). -
forge_pr_activityno longer calls/pulls/{n}/commentson Forgejo (HTTP 404); inline review comments come from reviews withcomments_count > 0(#188). -
CI installs shellcheck before linting, matching actionlint — the Forgejo runner image does not ship it (#188).