feat(web): sync issues, pull requests, and refs with GitHub 2 months ago
Authored
Madison 7/26/2026, 2:55:48 PM Inbound applies what GitHub reports, outbound pushes local changes back, and
writes prefer the acting user's own token so activity lands under their
account rather than the bot. Refs stage into refs/github-sync/incoming first
so ancestry is checkable before any real ref moves. Parentb0c0ab8
29 files changed
apps/web/app/[username]/[repository]/issues/actions.ts +39 −7 apps/web/app/[username]/[repository]/pulls/[number]/actions.ts +58 −0 apps/web/db/github-sync.ts +1271 −0 apps/web/lib/github/sync/attribution.ts +68 −0 apps/web/lib/github/sync/backfill.ts +255 −0 apps/web/lib/github/sync/bootstrap.ts +39 −0 apps/web/lib/github/sync/branch-updates.ts +168 −0 apps/web/lib/github/sync/clients.ts +380 −0
apps/web/lib/github/sync/create-remote.ts +230 −0
apps/web/lib/github/sync/dispatch-webhook.test.ts +308 −0
apps/web/lib/github/sync/dispatch-webhook.ts +337 −0
apps/web/lib/github/sync/enqueue.ts +146 −0
apps/web/lib/github/sync/failure-message.test.ts +97 −0
apps/web/lib/github/sync/failure-message.ts +67 −0
apps/web/lib/github/sync/fork-heads.ts +104 −0
apps/web/lib/github/sync/fork-repositories.ts +152 −0
apps/web/lib/github/sync/git-mirror.ts +249 −0
apps/web/lib/github/sync/installations.ts +58 −0
apps/web/lib/github/sync/issues-inbound.ts +431 −0
apps/web/lib/github/sync/issues-outbound.ts +279 −0
apps/web/lib/github/sync/link-thread.ts +36 −0
apps/web/lib/github/sync/pulls-inbound.ts +777 −0
apps/web/lib/github/sync/pulls-outbound.ts +553 −0
apps/web/lib/github/sync/reconcile.ts +55 −0
apps/web/lib/github/sync/ref-state.ts +9 −0
apps/web/lib/github/sync/refs-inbound.ts +242 −0
apps/web/lib/github/sync/refs-outbound.ts +203 −0
apps/web/lib/github/sync/run-job.ts +240 −0
apps/web/lib/github/sync/write-as-actor.test.ts +405 −0