Home

boring / v2

publicBoring-Software-Inc/v2
Overview Code History Branches Pull requestsIssuesInsights Campfire Docs
main
HomeOverview Code PRsIssues

fix(worker): carry the installation id so a lazily-upserted repo can act

2 months ago

1884423
Authored
grim8/22/2026, 9:46:39 AM
Two bugs stopped an open-git repo from ever getting a check.

The lazy repo upsert called syncInstallationRepos, which writes
forge: "github" unconditionally. An open-git event created a GitHub row that
getRepoByFullName(..., "opengit") could never find, so every delivery made a
new row and none of them could mint a token. It now calls ensureRepo, which
takes the forge.

It also passed an empty installation id, so the token mint threw
'no installation for <repo>' and no action executed. NormalizedEvent now
carries installationExternalId, set from the payload by both normalizers.

open-git is why this has to ride on the pull-request event: its
installation.created lists repositories as bare uuids, with no owner or name to
build a repo row from, so the installation event alone can never register a
repo. GitHub sets the same field, which fixes the empty id there too.

Parentb44631a

6 files changed
  • apps/worker/src/jobs/process-event.ts+32−22
  • packages/contracts/src/events.ts+11−0
  • packages/forge-github/src/webhook/normalize.ts+29−3
  • packages/forge-opengit/src/webhook/normalize.test.ts+15−0
  • packages/forge-opengit/src/webhook/normalize.ts+4−0
  • scripts/e2e/lib/opengit.ts+4−2