-
-
Notifications
You must be signed in to change notification settings - Fork 899
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:commitpre-merge-commit:merge-commitpre-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-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)
- introduce the following in a minor release
- a warning is shown for configuration using the old
stagesnames - a warning is shown for repos using the old
stagesnames (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_versionto 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
kbalston, swaldhoer, jameslamb, hawthwill, falkben and 1 morem-rsha, KyleKing, yanang007, adamchainz, mattyclarkson and 4 more