Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(pre-commit): autoupdate hooks #2426

Merged
merged 2 commits into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ default_install_hook_types:

# by default, confine hooks to these git stages (except for hooks that specify their own stages)
# https://pre-commit.com/#top_level-default_stages
default_stages:
- commit
default_stages: [pre-commit]
Comment on lines 11 to +13
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pre-commit-hooks 5.0 library now requires this formatting for this stages line: https://github.com/pre-commit/pre-commit-hooks/pull/1093/files

See more: https://github.com/pre-commit/pre-commit-hooks/releases/tag/v5.0.0

--

The way I figured this out is comparing these Cal-ITP pre-commit autoupdate PRs with Compiler's https://github.com/compilerla/compiler.la/pull/243/files - which worked just fine. This auto robot PR tried to reformat the default_stages: 871b3c4#diff-63a9c44a44acf85fea213a857769990937107cf072831e1a26808cfde9d096b9L14 but did it in a buggy way.


repos:
- repo: https://github.com/compilerla/conventional-pre-commit
Expand All @@ -21,7 +20,7 @@ repos:
stages: [commit-msg]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: mixed-line-ending
Expand Down
Loading