Open
Description
this is mostly a confusion point / slightly annoying and a mistake I made when first introducing new hook types
currently all of the --hook-type
and stages
values match except for these three:
pre-commit
:commit
pre-merge-commit
:merge-commit
pre-push
:push
I'd like to deprecate the mismatched names!
this is going to need a long deprecation period since it's sorta subtle and usually not the user's fault and will need hook authors to (potentially) make updates
the plan is to do the following:
- introduce the following in a minor release
- no deprecation notice in this initial release (give authors / users some time to update without warnings)
- the new names are available in addition to the old names
migrate-config
will autofix.pre-commit-config.yaml
usages ofstages
with the old values (there isn't an equivalentmigrate-manifest
-- though users outnumber hook authors by several orders of magnitude)
- introduce the following in a minor release
- a warning is shown for configuration using the old
stages
names - a warning is shown for repos using the old
stages
names (do this at install time so it only shows once as to not be super annoying for users who have no control) - a recommendation for hook authors to also set
minimum_pre_commit_version
to this version
- a warning is shown for configuration using the old
- a long time passes (typically my deprecation period has been 12-18+ months)
- introduce the following in a major release
- removal of the old names
Activity
chore(deps): update dependency pre-commit to v3 (#2)
fix: allow to use older pre-commit hook version
Stop using deprecated pre-commit stage names.
pre-commit
v4 PyCQA/isort#2294Stop using deprecated pre-commit stage names.
7 remaining items