Skip to content

Commit

Permalink
ci: Enfore pre-commit version >= 3.2.0
Browse files Browse the repository at this point in the history
Older pre-commit versions are not compatible with the used pre-commit
configuration since the `commit` stage was renamed to `pre-commit`.

This can lead to error messages like:
Expected one of commit, commit-msg, manual, merge-commit, post-checkout, post-commit,
post-merge, post-rewrite, prepare-commit-msg, push but got: 'pre-commit'

With a minimum required version the error messages is clearer.
  • Loading branch information
MoritzWeber0 committed Feb 26, 2024
1 parent ac1892c commit 77181e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

default_install_hook_types: [commit-msg, pre-commit]
default_stages: [commit, merge-commit]
minimum_pre_commit_version: 3.2.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
Expand Down

0 comments on commit 77181e9

Please sign in to comment.