refactor(webhook-handlers): migrate to adapter factory (MF-10) #315
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!315
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/mf10-migrate-webhook-handlers"
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?
Summary
webhook-handlers.ts.new ForgejoAdapter(token)callsites inapps/server/src/http/webhook-handlers.tswithcreateForgeAdapterForRepo(repo, token)from../infrastructure/forge/adapter-factory.forge:binding inconfig/agents.json.ForgejoAdapter(factory default), only non-Forgejo repos see the observable change.Callsites migrated (all in
apps/server/src/http/webhook-handlers.ts):fetchLinkedIssueLabels→getIssuefindLinkedPrForIssue→listPullRequestsdetectOutstandingChangeRequest→listReviewshandleReviewRequested→getPullRequesthandleChangesRequested→getPullRequesthandlePullRequestOpened→repoHasWorkflowshandlePostMergeRebase→listPullRequestsThe
ForgejoAdapterimport is dropped;parseRepois kept (still needed to normaliseowner/nameinto the port'sRepoRef).Test plan
bun run typecheck— cleanbun run lint— biome cleanbun test apps/server/src/http/webhook-handlers.test.ts— 52 pass, 0 failRefs: #299 (MF-8 out-of-scope list), #313 (MF-8 merge).