2 months ago
1884423Two 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