Skip to content

Commit

Permalink
ci: add conventional-commits to pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Rizhiy committed Mar 17, 2024
1 parent bf91298 commit 7b2a866
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ repos:
args: [--fix]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.1.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: []
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,13 @@ pip install pycs
- To test code, use [pytest](https://pytest.org): `pytest .`
- This repository follows semantic-release, which means all commit messages have to follow a [style](https://python-semantic-release.readthedocs.io/en/latest/commit-parsing.html).
You can use tools like [commitizen](https://github.com/commitizen-tools/commitizen) to write your commits.
- You can also use [pre-commit](https://pre-commit.com/) to help verify that all changes are valid.
Multiple hooks are used, so use the following commands to install:

```bash
pre-commit install
pre-commit install --hook-type commit-msg
```

## Acknowledgements

Expand Down

0 comments on commit 7b2a866

Please sign in to comment.