T-KYRZ-pr-update-and-pr-commands-go-through-the-code-host-port
State: planning/backlog · Impact: medium · Complexity: medium
Forgejo support is deferred. When it comes back, pr survey/pr update and every command that
takes a PR argument must work on a Forgejo-hosted repo. Today only pr classify, the prs tick
and the Router go through the port (being renamed from Forge to CodeHost in
#2472, still open). Carried over from M-JEH1.
packages/ts/pr-update/src/survey.tsimports@sksizer/easy-ghand talks to GitHub directly (README, “GitHub today, a Forge port later”).- The port lives in
solutions/ontological/lib/services/pr/forge/(code-host/once #2472 merges), whichpackages/ts/pr-updatecannot import without inverting the package dependency. parsePrInput(forge/pr-ref.ts) is wired only intopr review;classify,updateand the others parse PR arguments their own way.ops/review.tsstill reads PR state withgh.prView(T-G1NZ’s known gap).
Proposed
Section titled “Proposed”The CodeHost port lives in a package both pr-update and sdlc import. pr-update’s survey and
update read PR state through it, every PR-argument command uses parsePrInput, and a Forgejo
fixture gives the same pr-update verdicts as GitHub.
Approach
Section titled “Approach”- Decide the port’s package home (likely its own
packages/ts/package, or inside pr-update). - Move the port and adapters there; sdlc imports it.
- Route pr-update
survey/updatethrough the port; inject it through pr-update’s ports. - Wire
parsePrInputinto every command that accepts a PR argument; movepr reviewoffgh.prView. - Add a Forgejo fixture for pr-update.
| Area | Note |
|---|---|
solutions/ontological/lib/services/pr/forge/ | The port and adapters (code-host/ after #2472) |
packages/ts/pr-update/ | survey and update |
solutions/ontological/lib/services/pr/ops/ | PR-argument commands |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
packages/ts/pr-updatehas no@sksizer/easy-ghimport outside an adapter. - AC-2: Every command that takes a PR argument parses it with
parsePrInput. - AC-3: A Forgejo fixture produces the same survey/update verdicts as the GitHub one.
Out of scope
Section titled “Out of scope”- Other code hosts (GitLab).