ci: auto-fix prettier formatting in pre-commit hook and CI (#498)

Pre-commit hook:
- Stage all files modified by prettier:fix, not just src/generated/

CI (GitHub Actions):
- Add prettier-fix job that runs on PRs from the same repo
- Auto-commits formatting fixes back to the PR branch
- Skips fork PRs (no write access to fork branches)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Olivier Chafik 2026-02-24 18:37:57 +00:00 • committed by GitHub
commit 1728617194
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,5 +17,5 @@ fi
npm run build:all
npm run prettier:fix
# Stage any changes to generated files (they may have been reformatted by prettier)
git add src/generated/
# Stage any files reformatted by prettier (generated files, source, docs, etc.)
git diff --name-only --diff-filter=M | xargs -r git add