Skip to content

Commit b7e04a7

Browse files
committed
fix: fixes
1 parent efba831 commit b7e04a7

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed

README.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,87 @@ make pre-commit-install # Install pre-commit hooks
274274
make pre-commit-run # Run pre-commit hooks on all files
275275
```
276276

277+
### Commitizen - Conventional Commits
278+
279+
This project uses [Commitizen](https://commitizen-tools.github.io/commitizen/) to ensure consistent and semantic commit messages following the [Conventional Commits](https://www.conventionalcommits.org/) standard.
280+
281+
#### Using `cz commit`
282+
283+
Instead of using `git commit`, use Commitizen's interactive CLI:
284+
285+
```bash
286+
uv run cz commit
287+
```
288+
289+
This will guide you through creating a properly formatted commit message with:
290+
291+
1. **Type**: Select the type of change (feat, fix, docs, style, refactor, test, chore, etc.)
292+
2. **Scope** (optional): Specify the area of the codebase affected
293+
3. **Subject**: Short description of the change
294+
4. **Body** (optional): Longer description providing context
295+
5. **Breaking changes** (optional): Describe any breaking changes
296+
6. **Footer** (optional): Reference issues, PRs, etc.
297+
298+
#### Example Commit Flow
299+
300+
```bash
301+
# Stage your changes
302+
git add .
303+
304+
# Use Commitizen to create a commit
305+
uv run cz commit
306+
307+
# Example output:
308+
# ? Select the type of change you are committing: feat
309+
# ? What is the scope of this change? (optional): api
310+
# ? Write a short and imperative summary: add user authentication endpoint
311+
# ? Provide additional contextual information: (optional)
312+
# ? Is this a BREAKING CHANGE? No
313+
# ? Footer: (optional)
314+
315+
# Result: feat(api): add user authentication endpoint
316+
```
317+
318+
#### Commit Message Format
319+
320+
The standard format is:
321+
322+
```
323+
<type>(<scope>): <subject>
324+
325+
<body>
326+
327+
<footer>
328+
```
329+
330+
**Types:**
331+
- `feat`: A new feature
332+
- `fix`: A bug fix
333+
- `docs`: Documentation changes
334+
- `style`: Code style changes (formatting, missing semicolons, etc.)
335+
- `refactor`: Code refactoring without changing functionality
336+
- `perf`: Performance improvements
337+
- `test`: Adding or updating tests
338+
- `chore`: Maintenance tasks (build, CI/CD, dependencies)
339+
- `ci`: CI/CD configuration changes
340+
- `build`: Build system changes
341+
342+
**Examples:**
343+
344+
```bash
345+
feat(auth): add JWT authentication
346+
fix(database): resolve connection pool timeout
347+
docs(readme): update installation instructions
348+
test(api): add integration tests for health endpoint
349+
```
350+
351+
#### Benefits
352+
353+
- ✅ Automatically validates commit messages
354+
- ✅ Enables semantic versioning and automatic changelog generation
355+
- ✅ Improves collaboration through clear commit history
356+
- ✅ Enforced by pre-commit hooks (commit-msg stage)
357+
277358
## Available Commands
278359

279360
Run `make help` to see all available commands, or use:

0 commit comments

Comments
 (0)