refactor(server): migrate deps to ForgePort #277
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!277
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor/migrate-deps-to-forgeport"
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?
Third per-consumer Forgejo migration. Follows the pipeline (#275) and board (#276) pattern; based on main post-#276.
Scope
domain/workflow/deps.tsmoves from rawforgejo-apiimports toForgejoAdapterfor every call except one.What changed
DependentView.comments: IssueCommentSummary[]→ForgeComment[]commentHistoryHoldsparameter type followsListIssuesFnDI seam returnsForgeIssue[]; production default wrapsnew ForgejoAdapter(token).listIssues(parseRepo(repo), opts)classifyBlockers/buildDependentView/buildIssueDepsGraphdrop theiras unknown as {state?, assignee?, labels?}casts — adapter returns properly typedForgeIssuepropagateDependencyClosure'sonAssignedReadycallback still accepts the legacy{ number, title, labels?: { name?: string }[] }shape; the propagator mapsview.labels(string[]) back to[{name}]at the call site sowebhook-handlers.ts::handleIssueAssignedkeeps workinglistIssuespinstype=issuesserver-sideThe one kept raw import
getIssueBlocksfromforgejo-api— kept forfindDependents' cross-repo filter (#196), which readsrepository.full_nameto drop rows from foreign repos. The port'sgetBlockedreturnsForgeIssueRef[](number + state) without the source-repo attribution, so I couldn't replace this one call site cleanly. Documented inline.Tests
deps.test.tsfixture helpers returnForgeIssue/ForgeComment(matches pipeline/board pattern)Overlap with sibling PRs
Opened alongside #278 (janitor) and #277 (webhook-ci). Janitor's PR extends the port:
getBlockers/getBlockedreturnForgeIssueRef[]instead ofnumber[]. Since this PR was authored against main BEFORE the janitor port change, the types the DI seam uses are still the old shape where janitor didn't touch them. If janitor merges first, a trivial fixup here will map.numberout of the returned refs. If this merges first, janitor rebases instead.