fix: unbreak the ci format check and add lefthook hooks #3
Inga granskare
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-reconcile-trigger!3
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "fix/ci-format-check"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
mainwas failing its own CI, and this repo had no pre-commit hooks to prevent that. Bothhalves are fixed here: unbreak the check, then install the hooks that stop it recurring.
The breakage
pnpm format:checkreportedREADME.mdas unformatted (markdown table column alignment inthe HTTP-surface table). Because
ciruns onpull_request, every PR to this repo failedthe check — Renovate's
chore(deps): pin dependency fta-cli to 3.0.0(task #2) failed for thisreason, not because of the dependency change. The identical Renovate PR passed in
bitborg-auth-reconciler, which is what gave it away. With branch protection now requiring
ci,this had made the repo unmergeable.
The prevention
This repo had no lefthook at all — no config, no installed hooks — while bitborg-web,
bitborg-infra and bitborg-internal all have it. An unformatted file could therefore reach
mainunnoticed, which is exactly what happened.
Changes
README.md— Prettier reformatting (whitespace only), plus atextlanguage on thefenced block at line 15, which markdownlint's MD040 flags
.forgejo/workflows/ci.yml— header comment said "bitborg-auth-reconciler CI", a copy-pasteleftover from the repo this scaffold came from
lefthook.json— modelled on bitborg-web's, minus the Astro/stylelint jobs.pre-commitruns prettier on staged files, markdownlint on staged
*.md, eslint--fixon stagedJS/TS/JSON, all
stage_fixed: true.pre-pushruns build and test..markdownlint-cli2.jsonc— copied verbatim from bitborg-internal/bitborg-infralefthook@2.1.10+markdownlint-cli2@0.23.1devDependencies, same pins as the other repospnpm-workspace.yaml—allowBuilds: { lefthook: true }. Required: without it pnpmblocks lefthook's postinstall, which is what installs the hooks, so they would silently never
be installed.
Verified
All six CI steps pass locally (
audit,typecheck,eslint,format:check,test,build);markdownlint is clean (was 1 MD040 issue);
pnpm installreportssync hooks: ✔️(pre-push, pre-commit); the pre-commit hook ran on these commits and thepre-push hook ran build and test on push.
Renovate's pin PR should go green on a rebase once this merges.
fix: unbreak the ci format check on maintill fix: unbreak the ci format check and add lefthook hooks