Skip to content

fix(migrate): summarize skipped git hooks#1864

Closed
leno23 wants to merge 2 commits into
voidzero-dev:mainfrom
leno23:codex/migrate-hooks-skip-summary-1854
Closed

fix(migrate): summarize skipped git hooks#1864
leno23 wants to merge 2 commits into
voidzero-dev:mainfrom
leno23:codex/migrate-hooks-skip-summary-1854

Conversation

@leno23

@leno23 leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep the inline preflight warning when git hook migration is skipped
  • carry the skip reason into the migration plan
  • show the skipped hook setup in the final Manual follow-up summary

Closes #1854

Verification

  • git diff --check
  • pnpm exec tsgo --noEmit -p packages/cli/tsconfig.json

Notes

pnpm -F vite-plus test src/migration/__tests__/migrator.spec.ts -- --runInBand could not start in this checkout because Vitest resolves the local Vite workspace package and vite/dist/vite/node/index.js has not been built. This is the same local workspace-dist blocker seen while preparing #1863.

@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 9589d1f
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a33842bad9d720008e33f7b

@leno23 leno23 marked this pull request as ready for review June 18, 2026 04:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bc46f81c23

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1033 to +1034
if (plan.gitHooksSkipReason) {
addManualStep(report, `Git hooks were not migrated: ${plan.gitHooksSkipReason}`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Summarize hook skips for existing Vite+ migrations

collectMigrationSetupPlan is shared by the existing-Vite+ branch, but this is the only place that turns gitHooksSkipReason into a manual step, and that branch later prints a summary only for didMigrate || report.warnings.length > 0. In an already-migrated project that still has legacy hooks but preflight skips them (for example an unsupported lint-staged config or another hook tool), the user sees only the inline warning and the final “already using Vite+” path still omits the Manual follow-up this change is meant to add. Add the manual step, and include manual steps in that branch’s summary gate, there as well.

Useful? React with 👍 / 👎.

@leno23

leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Updated the migration snap fixtures for the skipped git-hook manual follow-up output shown by CI.\n\nValidation:\n- git diff --check\n- Verified the changed files match the 10 failing snap fixtures reported in the CI diff\n\nNote: I tried a targeted local snap-test invocation, but this checkout's snap-test runner rejected the guessed --update/--case options, so I kept validation to the CI-provided golden diff plus whitespace checks.

@naokihaba

Copy link
Copy Markdown
Collaborator

Discussions regarding this matter are still ongoing, and there are several points that need to be finalized before we modify the code. Specifically, we need to decide whether the next step should be preparing the documentation, improving the CLI UX, or adjusting the migration behavior.

@naokihaba

Copy link
Copy Markdown
Collaborator

@leno23

Thank you for your work on this.

After the discussion in #1854, the agreed direction is to document the current behavior in the migration guide
rather than change the migration behavior here. vp migrate currently supports lint-staged, while other Git
hook tools are intentionally skipped and should be configured manually.

I’ll take it from here.

@naokihaba naokihaba closed this Jun 19, 2026
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.

vp migrate: precommit migration is silently skipped for lefthook/simple-git-hooks/yorkie even when opted-in

2 participants