Skip to content

Commit

Permalink
build(hooks): Ensure Conventional Commit messages
Browse files Browse the repository at this point in the history
  • Loading branch information
asyrjasalo committed Jul 29, 2024
1 parent 285a966 commit ca210bf
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# Install the hooks in this file:
# pre-commit install --hook-type pre-commit
# pre-commit install --hook-type commit-msg
#
# (optional) test hooks for staged files:
# pre-commit run --verbose
#
# (optional) test hooks for all files:
# pre-commit run --all-files --verbose

default_stages: [commit]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
Expand All @@ -20,3 +32,9 @@ repos:
rev: 24.4.2
hooks:
- id: black

- repo: https://github.com/commitizen-tools/commitizen
rev: v3.28.0
hooks:
- id: commitizen
stages: [commit-msg]
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,16 @@ Install [pre-commit](https://pre-commit.com/) if not already installed:

python -m pip install --user pre-commit

Install pre-commit hooks in your working copy:
Install pre-commit hooks in your git working copy:

pre-commit install
pre-commit install --hook-type pre-commit
pre-commit install --hook-type commit-msg

Kindly create an [issue](https://github.com/asyrjasalo/RESTinstance/issues)
and then create a pull request.

Use [Conventional Commits](https://www.conventionalcommits.org/).

### Local development

Install [PDM](https://pdm-project.org/latest/):
Expand Down

0 comments on commit ca210bf

Please sign in to comment.