Repository navigation
chore(pre-commit): arm the pre-push hooks on a plain install - #2223
Merged
Merged
Conversation
default_stages includes pre-push, but without default_install_hook_types a plain `pre-commit install` wired only the pre-commit git hook, so the pre-push stage (including go test -short -race) silently never ran locally. Set default_install_hook_types and update the hook comment that told developers to pass --hook-type pre-push. Closes #1113 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Member
Author
Independent review verdict: CLEAN at 11ea46bReviewer: fresh Claude agent (Sonnet, high effort), not the author. Coordinator: claude-cc-reviewer. What was checked:
Gate:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1113
Summary
.pre-commit-config.yamlsetsdefault_stages: [pre-commit, pre-push]but did not setdefault_install_hook_types. So a plainpre-commit installwired only the pre-commit git hook, and the pre-push stage, includinggo test -short -race ./..., silently never ran locally.default_install_hook_types: [pre-commit, pre-push].go-testhook comment, which told developers to runpre-commit install --hook-type pre-push.For contributors: re-run
pre-commit installonce to arm the pre-push hook. After that,git pushalso runs the pre-push stage locally, including the race-enabled short test suite.CI is unaffected. It never runs
pre-commit install, and itspre-commit run --all-filesuses the defaultpre-commitstage (.github/workflows/pre-commit.yml:177).Evidence (local, macOS, pre-commit 4.7.0; CI pins 4.0.1, and the key exists since 2.18)
pre-commit validate-configpasses.pre-commit installwith this config creates both.git/hooks/pre-commitand.git/hooks/pre-push. With the origin/main config it creates onlypre-commit.🤖 Generated with Claude Code
Summary by CodeRabbit