mirror of
https://github.com/vercel/chat.git
synced 2026-09-14 18:32:29 +08:00
1bdbc31039
- Add @commitlint/cli and @commitlint/config-conventional (pinned to 21.0.0)
and husky as root devDependencies.
- commitlint.config.js extends config-conventional, allows free-form scopes,
and ignores auto-generated Merge / Revert commits.
- .husky/commit-msg runs commitlint on every local commit; husky installs
automatically via the `prepare` script on `pnpm install`.
- New `commitlint` CI job in .github/workflows/ci.yml lints PR commits
(--from base.sha --to head.sha) and the most recent commit on direct
pushes to main (--last). SHAs are passed via `env:` rather than direct
`${{ … }}` interpolation to avoid the script-injection class of bug.
- CI uses `pnpm install --frozen-lockfile`, so the commitlint binary that
runs is exactly the version pinned in pnpm-lock.yaml.
- .github/CONTRIBUTING.md documents the local hook + CI enforcement.