Skip to content

Fix onboarding hooks step to use prek instead of pre-commit#133

Merged
Miyamura80 merged 2 commits intomainfrom
fix/onboard-prek-hooks
Feb 24, 2026
Merged

Fix onboarding hooks step to use prek instead of pre-commit#133
Miyamura80 merged 2 commits intomainfrom
fix/onboard-prek-hooks

Conversation

@Miyamura80
Copy link
Owner

Summary

  • Updated onboard.py hooks step (step 4/6) to read prek.toml instead of .pre-commit-config.yaml
  • Replaced yaml import with stdlib tomllib for TOML parsing
  • Changed install command from uv run pre-commit install to prek install
  • Removed pre-commit from dev dependencies in pyproject.toml

Test plan

  • Run make onboard and verify step 4 (Hooks) no longer errors with ".pre-commit-config.yaml not found"
  • Verify the hooks table displays all hooks from prek.toml
  • Verify prek install is invoked when activating hooks

🤖 Generated with Claude Code

The hooks step was looking for .pre-commit-config.yaml which no longer
exists after the migration to prek. Updated to read prek.toml with
tomllib, invoke `prek install`, and removed the pre-commit dev dependency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 24, 2026

Greptile Summary

Migrated the onboarding hooks step from pre-commit to prek by switching from YAML to TOML parsing and updating the install command to use uv tool run prek install.

  • Replaced yaml import with stdlib tomllib for parsing prek.toml instead of .pre-commit-config.yaml
  • Changed install command from uv run pre-commit install to uv tool run prek install (properly addresses previous review comment about prek availability)
  • Removed redundant pre-commit>=4.5.1 from dev dependencies (PyYAML remains in main dependencies for other uses)
  • Updated all user-facing text references from "pre-commit" to "prek"
  • Parsing logic remains identical since prek.toml uses the same structure as pre-commit-config.yaml

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are straightforward and well-executed: replaces deprecated yaml parsing with stdlib tomllib, correctly updates command to use uv tool run prek install (addressing the previous review concern), and properly removes only the redundant pre-commit dependency while keeping PyYAML for other uses. The parsing logic is unchanged and correct for the prek.toml structure.
  • No files require special attention

Important Files Changed

Filename Overview
onboard.py Replaced yaml with tomllib for parsing prek.toml, updated command to use uv tool run prek install
pyproject.toml Removed redundant pre-commit from dev dependencies (PyYAML remains in main dependencies)
uv.lock Lockfile updated to remove pre-commit and its dependencies (cfgv, distlib, identify, nodeenv, virtualenv)

Last reviewed commit: 4674c7c

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Miyamura80 Miyamura80 merged commit 83ed4ac into main Feb 24, 2026
11 checks passed
@github-actions github-actions bot deleted the fix/onboard-prek-hooks branch February 24, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants