Skip to content

Commit

Permalink
ci: add commit message validation hook
Browse files Browse the repository at this point in the history
  • Loading branch information
jourdain committed Feb 4, 2025
1 parent 0acfab3 commit 96fbedb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional']
};
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ repos:
rev: v0.8.4
hooks:
- id: ruff
- id: ruff-format
- id: ruff-format
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.20.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ['@commitlint/config-conventional']
1 change: 1 addition & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Contributing to trame
#. Clone the repository using ``git clone``
#. Install pre-commit via ``pip install pre-commit``
#. Run ``pre-commit install`` to set up pre-commit hooks
#. Run ``pre-commit install --hook-type commit-msg`` to register commit-msg hook
#. Make changes to the code, and commit your changes to a separate branch
#. Create a fork of the repository on GitHub
#. Push your branch to your fork, and open a pull request
Expand Down

0 comments on commit 96fbedb

Please sign in to comment.