Conventional Commits
To maintain a clean and readable commit history, we enforce the Conventional Commits standard.
What is a Conventional Commit?
A conventional commit follows this structure:
<type>(optional scope): <description>
[optional body]
[optional footer(s)]
Examples
feat(auth): add support for OAuth2 login
fix(api): handle 500 errors from backend
docs(readme): update setup instructions
refactor(ui): simplify button component
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
To simplify writing correct commit messages, we recommend using better-commits
.
You can run it without installation:
npx better-commits
It 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-commits
Then use it as:
better-commits
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
- π 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.