Skip to content

Commit 01c8d9f

Browse files
Anis Da Silva Campossebastien-boulle
Anis Da Silva Campos
authored andcommitted
docs(readme): explain how to setup pre-commit
adding the configuration necesarry to run the validator during
1 parent f0eb02e commit 01c8d9f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,24 @@ jobs:
247247
- if `no_jira` is not empty, no validation is done on JIRA refs.
248248
- if `allow_temp` is not empty, no validation is done on `fixup!` and `squash!` commits.
249249

250+
## Add pre-commit plugin
251+
252+
If you are using [pre-commit](https://pre-commit.com/) in you repository, you can add this to your configuration so commit messages are checked locally:
253+
254+
Into `.pre-commit-config.yaml`:
255+
```yaml
256+
...
257+
repos:
258+
...
259+
- repo: https://github.com/lumapps/commit-message-validator
260+
rev: master
261+
hooks:
262+
- id: commit-message-validator
263+
stages: [commit-msg]
264+
...
265+
```
266+
Then run `pre-commit install --hook-type commit-msg` to install the `commit-message-validator`
267+
250268
<!-- ROADMAP -->
251269

252270
## Roadmap

0 commit comments

Comments
 (0)