Browser inputs make every package source file a generator input, so the pre-commit job ran the 16-second generator on nearly every commit while few commits change its output. gen-third-party-notices.spec.ts already asserts the committed bytes in the test lane, including the required node 24 / coverage pull-request lane, and names the regeneration command when they are stale. The generated preamble, the notices decision, and the development guide now describe that ownership. Refs #5852
46 lines
1.4 KiB
YAML
46 lines
1.4 KiB
YAML
# Git hooks (lefthook). Keep these local checkpoints fast; CI owns the full
|
|
# repository-wide gate matrix.
|
|
# Install: `node scripts/install-lefthook.mjs` (runs automatically via postinstall).
|
|
|
|
pre-commit:
|
|
jobs:
|
|
- name: translation pairing (staged records)
|
|
glob: '*.i18n.yaml'
|
|
exclude:
|
|
- '.agents/notes/archived/**'
|
|
run: node_modules/.bin/tsx scripts/verify-translation-pairing.ts --cached {staged_files}
|
|
|
|
- name: archived agent notes
|
|
glob: '.agents/notes/archived/**'
|
|
run: node_modules/.bin/tsx scripts/verify-archived-agent-notes.ts
|
|
|
|
- name: lint (staged)
|
|
glob: '*.{ts,tsx,mts,cts,mjs}'
|
|
exclude:
|
|
- 'vendor/*/src/**'
|
|
run: node_modules/.bin/tsx scripts/run-oxlint.ts --config .oxlintrc.staged.json --fix --no-error-on-unmatched-pattern {staged_files}
|
|
stage_fixed: true
|
|
|
|
- name: whitespace (staged)
|
|
run: git diff --cached --check
|
|
|
|
- name: vendor manifest guard
|
|
run: scripts/check-vendor-manifest.sh
|
|
|
|
pre-merge-commit:
|
|
jobs:
|
|
- name: translation pairing (staged records)
|
|
glob: '*.i18n.yaml'
|
|
exclude:
|
|
- '.agents/notes/archived/**'
|
|
run: node_modules/.bin/tsx scripts/verify-translation-pairing.ts --cached {staged_files}
|
|
|
|
- name: archived agent notes
|
|
glob: '.agents/notes/archived/**'
|
|
run: node_modules/.bin/tsx scripts/verify-archived-agent-notes.ts
|
|
|
|
pre-push:
|
|
jobs:
|
|
- name: typecheck
|
|
run: pnpm run typecheck
|