refactor(slash-commands,main): migrate to adapter factory (MF-10) #317

Merged
code-lead merged 1 commit from feat/mf10-migrate-slash-main into main 2026-04-24 10:39:41 +00:00
Collaborator

Summary

Cleanup of MF-8 (#299) out-of-scope list — migrates slash-commands.ts + main.ts remaining callsites from new ForgejoAdapter(token) to createForgeAdapterForRepo(repo, token) so non-Forgejo repos (MF-1 GitHub / MF-2 GitLab) resolve to the right ForgePort.

  • apps/server/src/domain/workflow/slash-commands.ts — 2 callsites in applyRaiseCapCommand (/raise-cap ack comment + miss comment). Both had repo in scope.
  • apps/server/src/main.ts — 1 callsite in handleTaskRedispatch (issue fetch before re-dispatch). row.repo in scope.

Three callsites migrated total. No exceptions — every site had a concrete repo binding available.

Test plan

  • tsc --noEmit clean
  • biome check clean
  • slash-commands.test.ts — 16 pass, 0 fail
  • Operator smoke: /raise-cap $5 on an open issue → Forgejo comment posted under the right token
  • Operator smoke: POST /task/:id/redispatch on a cancelled task → 202 with new task id

🤖 Generated with Claude Code

## Summary Cleanup of MF-8 (#299) out-of-scope list — migrates `slash-commands.ts` + `main.ts` remaining callsites from `new ForgejoAdapter(token)` to `createForgeAdapterForRepo(repo, token)` so non-Forgejo repos (MF-1 GitHub / MF-2 GitLab) resolve to the right `ForgePort`. - `apps/server/src/domain/workflow/slash-commands.ts` — 2 callsites in `applyRaiseCapCommand` (`/raise-cap` ack comment + miss comment). Both had `repo` in scope. - `apps/server/src/main.ts` — 1 callsite in `handleTaskRedispatch` (issue fetch before re-dispatch). `row.repo` in scope. Three callsites migrated total. No exceptions — every site had a concrete repo binding available. ## Test plan - [x] `tsc --noEmit` clean - [x] `biome check` clean - [x] `slash-commands.test.ts` — 16 pass, 0 fail - [ ] Operator smoke: `/raise-cap $5` on an open issue → Forgejo comment posted under the right token - [ ] Operator smoke: `POST /task/:id/redispatch` on a cancelled task → 202 with new task id 🤖 Generated with [Claude Code](https://claude.com/claude-code)
refactor(slash-commands,main): migrate to adapter factory (MF-10)
All checks were successful
qa / qa (pull_request) Successful in 3m55s
qa / dockerfile (pull_request) Successful in 7s
9d2809175a
Replaces the remaining `new ForgejoAdapter(token)` callsites in
`slash-commands.ts` (2x — /raise-cap ack + miss comments) and
`main.ts` (1x — `handleTaskRedispatch` issue fetch) with
`createForgeAdapterForRepo(repo, token)` so non-Forgejo repos
(MF-1 GitHub / MF-2 GitLab) resolve to the right `ForgePort`.

All three migrated sites have a concrete `repo` in scope. Cleanup
of the MF-8 (#313) out-of-scope list.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
code-lead deleted branch feat/mf10-migrate-slash-main 2026-04-24 10:39:42 +00:00
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
charles/claude-hooks!317
No description provided.