Skip to content

Commit b43a614

Browse files
committed
fix(init): use pre-push as pre-commit stage
Original "push" stage has been deprecated since pre-commit v3.2.0. See pre-commit/pre-commit#2732 and pre-commit/pre-commit#2808 for detailed information.
1 parent b8f9bf6 commit b43a614

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.pre-commit-hooks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@
2424
pass_filenames: false
2525
language: python
2626
language_version: python3
27-
minimum_pre_commit_version: "1.4.3"
27+
minimum_pre_commit_version: "3.2.0"

commitizen/commands/init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ def _install_pre_commit_hook(self, hook_types: list[str] | None = None) -> None:
330330
"rev": f"v{__version__}",
331331
"hooks": [
332332
{"id": "commitizen"},
333-
{"id": "commitizen-branch", "stages": ["push"]},
333+
{"id": "commitizen-branch", "stages": ["pre-push"]},
334334
],
335335
}
336336

poetry.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ deprecated = "^1.2.13"
119119

120120
[tool.poetry.group.linters.dependencies]
121121
ruff = "^0.11.5"
122-
pre-commit = ">=2.18,<5.0"
122+
pre-commit = ">=3.2.0,<5.0"
123123
mypy = "^1.16.0"
124124
types-deprecated = "^1.2.9.2"
125125
types-python-dateutil = "^2.8.19.13"

0 commit comments

Comments
 (0)