Conventional Commits
To maintain a clean and readable commit history, we enforce the Conventional Commits standard.
What is a Conventional Commit?
Section titled “What is a Conventional Commit?”A conventional commit follows this structure:
<type>(optional scope): <description>
[optional body]
[optional footer(s)]Examples
Section titled “Examples”feat(auth): add support for OAuth2 loginfix(api): handle 500 errors from backenddocs(readme): update setup instructionsrefactor(ui): simplify button component
PR Titles
Section titled “PR Titles”Your pull request title must also follow the Conventional Commit format.
⚠️ If the PR title does not follow this convention, GitHub Actions will fail, and the PR will be blocked from merging.
better-commits
Section titled “better-commits”To simplify writing correct commit messages, we recommend using better-commits.
You can run it without installation:
npx better-commitsIt will guide you through a step-by-step prompt to generate a properly formatted Conventional Commit.
You can also install it globally:
npm install -g better-commitsThen use it as:
better-commitsAccepted Commit Types
Section titled “Accepted Commit Types”| Type | Description |
|---|---|
feat | A new feature |
fix | A bug fix |
docs | Documentation-only changes |
style | Code style changes (formatting, no logic impact) |
refactor | Code changes that don’t fix a bug or add a feature |
test | Adding or updating tests |
chore | Maintenance tasks, tooling |
ci | Changes to CI/CD configuration |
build | Changes that affect the build system or dependencies |
Benefits
Section titled “Benefits”- 📖 Clear and standardized commit history
- 🚀 Support for automated changelogs and semantic releases
- 🔁 PR validation via GitHub Actions
- 🤖 Easy integration with tools like
better-commits
By following this convention and using better-commits, we ensure consistency and automation across all contributions.