# Commit Convention Guide This project uses [Conventional Commits](https://www.conventionalcommits.org/) with [changelogen](https://github.com/unjs/changelogen) for automatic changelog generation. ## Commit Message Format ``` [optional scope]: [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 ```bash git commit -m "feat: add user authentication system" ``` ### Bug Fix ```bash git commit -m "fix: resolve login validation error" ``` ### Breaking Change ```bash git commit -m "feat: redesign API structure BREAKING CHANGE: API endpoints have changed from /api/v1 to /api/v2" ``` ### With Scope ```bash git commit -m "feat(theme): add dark mode support" ``` ## Changelog Scripts ### Generate Changelog ```bash pnpm run changelog ``` ### Release with Changelog ```bash pnpm run changelog:release ``` ### Full Release Workflow ```bash pnpm run release ``` ## Best Practices 1. **Use present tense**: "add feature" not "added feature" 2. **Use imperative mood**: "fix bug" not "fixes bug" 3. **Keep first line under 72 characters** 4. **Reference issues**: "fix: resolve login issue (#123)" 5. **Include breaking changes**: Always document breaking changes in footer 6. **Be descriptive**: Explain what and why, not how ## Scopes (Optional) Common scopes for this project: - `theme` - Theme system changes - `eslint` - ESLint configuration - `ui` - User interface components - `auth` - Authentication system - `electron` - Electron-specific changes - `build` - Build system changes