ci: migrate the template repo's own hooks from pre-commit to prek#61
Merged
Conversation
The generated project already uses prek (prek-action in CI, prek in its justfile), but the template repo itself still linted with pre-commit. Align the two so the template dogfoods what it ships. - CI: replace the pre-commit job (pre-commit/action) with a prek job using j178/prek-action, the same action and pin the generated project uses. - justfile: prepare/lint/deps-update now call prek instead of pre-commit. - deps: swap the pre-commit dev dependency for prek ~=0.4.0 and relock. prek is config-compatible: it reads the same .pre-commit-config.yaml, and every hook passes against the template's own config. The sync-pre-commit-deps call and the config filename are unchanged (prek reads that same file). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VnSA7mKDr3hkDCxZeUvFZY
tsvikas
marked this pull request as ready for review
July 14, 2026 12:45
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.
What
The generated project already uses prek (prek-action in CI, prek in its justfile), but the template repo itself still linted with pre-commit. This aligns the two so the template dogfoods what it ships.
pre-commitjob (pre-commit/action) with aprekjob usingj178/prek-action, the same action and pin the generated project uses (ci.yml.jinja). This also drops the Node 20 deprecation annotation thatpre-commit/action's internalactions/cache@v4was triggering.prepare/lint/deps-updatenow callprekinstead ofpre-commit.pre-commitdev dependency forprek ~=0.4.0and relock.Why it's safe
prek is config-compatible: it reads the same
.pre-commit-config.yaml. Verified locally that every hook passes against the template's own config, full parity with pre-commit. Thesync-pre-commit-depscall and the config filename are unchanged (prek reads that same file).Notes
copier-template-testercache path). That PR handled the rendered projects' prek cache; this one migrates the template repo's own tooling.deps-updatekeeps the existing-j <nproc>job-count detection for a faithful behavioral swap (prek'sauto-updateaccepts-j). The generated justfile uses a plainerprek auto-update; harmonizing them is left as an optional follow-up.🤖 Generated with Claude Code
https://claude.ai/code/session_01VnSA7mKDr3hkDCxZeUvFZY