chore(hooks): add fast local pre-push hook for lint, commit style, and workflow YAML
Merged
GR
10d ago+244+244+012345678901234567890123456789-0-0-0123456789
Summary
Part 4 of the CI optimization series: adds a fast (<1s) local pre-push hook so lint, commit style, and workflow YAML errors are caught locally before burning CI runner time.
Changes
.githooks/pre-push:- Validates commit subjects against
.github/ci/check_commit_messages.py. - Runs
ruff checkandruff format --checkon changed.pyfiles only. - Validates YAML syntax on changed
.github/workflows/*.ymlfiles.
- Validates commit subjects against
Makefile: addsmake install-hooks(git config core.hooksPath .githooks).
Verification
bash -n .githooks/pre-pushpasses.- Measured runtime: ~0.05s (
<9sbudget).