mirror of
https://github.com/monoscope-tech/monoscope.git
synced 2026-11-16 10:18:01 +00:00
0123 hung a code mapping off `projects.github_sync`, which is
UNIQUE (project_id) and holds the ONE repo monoscope syncs its own
dashboard/monitor YAML with. A project's services live in as many repos
as they like, and that is a different question from where its config
lives — so the design made every repo but the config one unreachable, and
`fetchSnippet` refused any mapping that did not point at it.
Migration 0124 splits them:
* `github_sync` — one repo per project, monoscope's own YAML. Untouched.
* `github_credentials` — many per project, one per GitHub account, holding
the App installation. An installation already reaches every repo in that
account, which is why auth belongs here and not on a per-repo row.
* `code_mappings` — now names owner/repo/ref itself, authorised by a
credential. Adding the tenth service repo costs a mapping, not an
integration.
Existing 0123 mappings are carried across: a credential is minted from the
sync row's grant and the coordinates copied onto the mapping. One that
cannot be reconstructed is dropped — it could only ever have rendered
"no longer linked" anyway.
|
History
|
|
|---|---|---|
| .. | ||
| ServerSpec.hs | ||