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 of stages with the old values (there isn't an equivalent migrate-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 long time passes (typically my deprecation period has been 12-18+ months)
- introduce the following in a major release
this is mostly a confusion point / slightly annoying and a mistake I made when first introducing new hook types
currently all of the
--hook-typeandstagesvalues match except for these three:pre-commit:commitpre-merge-commit:merge-commitpre-push:pushI'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:
migrate-configwill autofix.pre-commit-config.yamlusages ofstageswith the old values (there isn't an equivalentmigrate-manifest-- though users outnumber hook authors by several orders of magnitude)stagesnamesstagesnames (do this at install time so it only shows once as to not be super annoying for users who have no control)minimum_pre_commit_versionto this version