You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
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.
Stop using deprecated pre-commit stage names.
ci: update `git-hooks.nix` flake and migrate `push` hook to `pre-push`
ci: update `git-hooks.nix` flake and migrate `push` hook to `pre-push`
pre-commit: Fix deprecated stage names
fix(init): use pre-push as pre-commit stage
fix(init): use pre-push as pre-commit stage
fix(init): use pre-push as pre-commit stage
fix(init): use pre-push as pre-commit stage
archana-1209 commentedon Aug 11, 2025
is someone working on this , or can I pick this up ? @asottile
asottile commentedon Aug 11, 2025
@archana-1209 we're sort of in the "wait out the deprecation period" phase of this so at the time there isn't much to do
fix(init): use pre-push as pre-commit stage
fix(init): use pre-push as pre-commit stage
fix(init): use pre-push as pre-commit stage
fix(init): use pre-push as pre-commit stage
fix(init): use pre-push as pre-commit stage
fix(init): use pre-push as pre-commit stage
fix(init): use pre-push as pre-commit stage
fix(init): use pre-push as pre-commit stage
fix(init): use pre-push as pre-commit stage
fix(init): use pre-push as pre-commit stage