chore(lefthook): run the CI checks on pre-push #88

Sammanfogat
supernaut sammanfogade 1 incheckning från chore/lefthook-pre-push in i main 2026-08-16 17:51:22 +00:00
Ägare

Runs both CI gates (prettier, markdownlint) on pre-push, so a failure costs seconds locally instead of a CI round trip.

Every job carries skip_empty: false, which is load-bearing. Lefthook decides which files a push touches by diffing against the branch's remote counterpart. A brand-new branch has none, so the file list is empty and every job is skipped with "no matching push files" — exactly the state a feature branch is in the first time it is pushed.

Measured in bitborg-infra: without it, a push carrying a deliberate lint violation was accepted with all jobs reported as skipped. A hook that reports success without running anything is worse than no hook.

Verified: pushing this branch ran both jobs and passed.

Runs both CI gates (prettier, markdownlint) on pre-push, so a failure costs seconds locally instead of a CI round trip. Every job carries `skip_empty: false`, which is load-bearing. Lefthook decides which files a push touches by diffing against the branch's remote counterpart. A brand-new branch has none, so the file list is empty and every job is skipped with "no matching push files" — exactly the state a feature branch is in the first time it is pushed. Measured in bitborg-infra: without it, a push carrying a deliberate lint violation was accepted with all jobs reported as skipped. A hook that reports success without running anything is worse than no hook. Verified: pushing this branch ran both jobs and passed.
supernaut lade till 1 incheckning 2026-08-16 15:32:30 +00:00
chore(lefthook): run the CI checks on pre-push
Alla kontroller lyckades
ci / ci (pull_request) Successful in 13s
50b83246fe
pre-commit formats staged files. Nothing ran the CI gates locally, so a format
or markdown failure only surfaced after a CI round trip.

Adds both CI checks as pre-push jobs: prettier and markdownlint.

Every job carries skip_empty: false, and that is load-bearing rather than
decorative. Lefthook decides which files a push touches by diffing against the
branch's remote counterpart. A brand-new branch has none, so the file list comes
back empty and every job is skipped with "no matching push files" — exactly the
state a feature branch is in the first time it is pushed. Measured in
bitborg-infra: without it, a push carrying a deliberate lint violation was
accepted with every job reported as skipped.

A hook that reports success without running anything is worse than no hook.
supernaut sammanfogade incheckning ac01387e4e till main 2026-08-16 17:51:22 +00:00
supernaut tog bort grenen chore/lefthook-pre-push 2026-08-16 17:51:22 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-08-16 17:51:23 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-10-02 17:57:00 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-docs!88
Ingen beskrivning angiven.