2.1 KiB
2.1 KiB
Commit Convention Guide
This project uses Conventional Commits with changelogen for automatic changelog generation.
Commit Message Format
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Types
| Type | Emoji | Description | Version Bump |
|---|---|---|---|
feat |
🚀 | New features | minor |
fix |
🐛 | Bug fixes | patch |
docs |
📖 | Documentation changes | patch |
style |
💄 | Code style changes | patch |
refactor |
♻️ | Code refactoring | patch |
perf |
⚡ | Performance improvements | patch |
test |
✅ | Adding tests | patch |
build |
🏗️ | Build system changes | patch |
ci |
🤖 | CI/CD changes | patch |
chore |
🧹 | Maintenance tasks | patch |
revert |
⏪ | Reverting changes | patch |
Examples
Feature
git commit -m "feat: add user authentication system"
Bug Fix
git commit -m "fix: resolve login validation error"
Breaking Change
git commit -m "feat: redesign API structure
BREAKING CHANGE: API endpoints have changed from /api/v1 to /api/v2"
With Scope
git commit -m "feat(theme): add dark mode support"
Changelog Scripts
Generate Changelog
pnpm run changelog
Release with Changelog
pnpm run changelog:release
Full Release Workflow
pnpm run release
Best Practices
- Use present tense: "add feature" not "added feature"
- Use imperative mood: "fix bug" not "fixes bug"
- Keep first line under 72 characters
- Reference issues: "fix: resolve login issue (#123)"
- Include breaking changes: Always document breaking changes in footer
- Be descriptive: Explain what and why, not how
Scopes (Optional)
Common scopes for this project:
theme- Theme system changeseslint- ESLint configurationui- User interface componentsauth- Authentication systemelectron- Electron-specific changesbuild- Build system changes