T-G1NZ-forgejo-adapter-for-the-forge-port
State: closed/done · Impact: low · Complexity: medium
The Forge port (T-DVLT) is only worth building if a second adapter actually
plugs in with no change elsewhere. docs/planning/notes/N-G3HA-forges-forgejo.md already
documents Forgejo’s REST API and its gaps against GitHub (notably no merge-state
field), so this task is the proof.
Approach
Section titled “Approach”- Implement the Forgejo adapter against the same
Forgeinterface, usingdocs/planning/notes/N-G3HA-forges-forgejo.mdfor the REST surface. - Map Forgejo’s weaker merge-state fields onto
PrFactsusing the same locally-computedbehind/aheadas GitHub, since Forgejo exposes no equivalent field at all. - Add per-repo forge selection from the remote URL, with a config override.
- Run pr-update’s and classify’s existing behavior against a Forgejo fixture repo.
| Area | Note |
|---|---|
packages/ts/pr-update/ (or wherever T-DVLT lands the port) | Forgejo adapter |
docs/planning/notes/N-G3HA-forges-forgejo.md | REST surface and gaps vs. GitHub |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1: A repo with a Forgejo remote resolves to the Forgejo adapter automatically.
- AC-2: pr-update and
pr classifyproduce equivalent verdicts against a Forgejo fixture PR as against an equivalent GitHub one. - AC-3: No code outside the adapter branches on forge name.
Out of scope
Section titled “Out of scope”- additional forges beyond GitHub and Forgejo
Known Gaps
Section titled “Known Gaps”sdlc pr review(solutions/ontological/lib/services/pr/ops/review.ts) still fetches PR state via a hand-builtGh.prViewcall instead ofForge/selectForge, so it stays GitHub-only — unlikeclassifyand theprstick, which both already go through the port. Routing it throughForge.getPris a separate follow-up, out of scope here.
Dependencies
Section titled “Dependencies”T-DVLT
Depends on
Section titled “Depends on”T-DVLT