Git Hooks and Conventions
This repository uses Lefthook, commitlint, Commitizen, and Conventional Commits to keep branch names and commit history predictable.
Git Hooks
Lefthook (lefthook.yml) enforces:
- pre-commit: branch name validation and lint-staged checks for ESLint and Prettier
- commit-msg: conventional commit format via commitlint
Branch naming:
<type>/STAR-<number>-<description>
Example:
feat/STAR-1582-repo-config
Exempt branches: main, master, develop, dev, release/*, hotfix/*.
Commits
Use Conventional Commits for commit messages:
feat(ui): add dark mode toggle
For the interactive Commitizen prompt, run:
pnpm commit
Environment Variables in Commits
This is a lightweight helper, not a complete environment-management solution yet. Treat the extracted list as a reminder to review required variables manually before deployment.
When introducing new environment variables, mention them in commit messages using env.VARIABLE_NAME or VARIABLE_NAME in CONSTANT_CASE.
The .github/workflows/auto-pr.yml extracts these names from commit messages and lists them in the pull request description under "Required Environment Variables". See GitHub Actions for the full Auto PR workflow behavior.
Example commit body:
Added error tracking with Sentry.
New environment variables:
- env.SENTRY_DSN
- env.SENTRY_AUTH_TOKEN
Release Notes
Release automation is driven by semantic-release and the shared @repo/semantic-release-config package.