Skip to content

Commit

Permalink
chore: Replace invalid git hook stage
Browse files Browse the repository at this point in the history
While working on my other PRs targetting this repository, I was
wondering why CI failed despite having installed pre-commit hooks. I
quickly realized that the `stages:` are being overwritten from their
default and use the non-existent `commit` stage. See for example the git
documentation which list the following commit-related hooks:

- pre-commit
- pre-merge-commit
- prepare-commit-msg
- commit-msg
- post-commit

This should hopefully improve the experience of any possible future
contributors and avoid unnecessary back-and-forth due to CI failures.

Signed-off-by: JP-Ellis <[email protected]>
  • Loading branch information
JP-Ellis committed Dec 18, 2024
1 parent 8ac2dfd commit 2bd88eb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ repos:
rev: v4.5.0
hooks:
- id: check-yaml
stages: [commit]
stages: [pre-commit]
- id: check-json
stages: [commit]
stages: [pre-commit]
- id: check-toml
stages: [commit]
stages: [pre-commit]
- id: check-merge-conflict
stages: [commit]
stages: [pre-commit]
- id: check-case-conflict
stages: [commit]
stages: [pre-commit]
- id: detect-private-key
stages: [commit]
stages: [pre-commit]
- repo: https://github.com/crate-ci/typos
rev: v1.16.20
hooks:
- id: typos
stages: [commit]
stages: [pre-commit]
- repo: https://github.com/crate-ci/committed
rev: v1.0.20
hooks:
Expand Down

0 comments on commit 2bd88eb

Please sign in to comment.