Skip to content

fix(config): auto-set git core.hooksPath without prompting#1157

Open
fengmk2 wants to merge 1 commit intomainfrom
auto-set-git-core-hooksPath
Open

fix(config): auto-set git core.hooksPath without prompting#1157
fengmk2 wants to merge 1 commit intomainfrom
auto-set-git-core-hooksPath

Conversation

@fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Mar 26, 2026

Summary

  • Skip the git-hook prompt in vp config when staged config already exists in vite.config.ts — the project has already opted into hooks
  • Recognize postinstall lifecycle in addition to prepare — projects that call vp config from postinstall (e.g. npmx.dev) now auto-install hooks without prompting
  • Add vp config hooks setup flow diagram and prompt decision table to RFC

Test plan

  • New snap test command-config-auto-hooks — verifies auto-install when staged config exists (no lifecycle env)
  • New snap test command-config-postinstall-auto-hooks — verifies auto-install from postinstall lifecycle
  • All existing command-config-* snap tests pass unchanged

Closes #1154

@netlify
Copy link

netlify bot commented Mar 26, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 118e3f4
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69c5e6814d4e61000873b8b8

Copy link
Member Author

fengmk2 commented Mar 26, 2026


How to use the Graphite Merge Queue

Add the label auto-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@fengmk2 fengmk2 self-assigned this Mar 26, 2026
@fengmk2 fengmk2 changed the title fix(config): skip git-hook prompt when staged config already exists fix(config): auto-set git core.hooksPath without prompting Mar 26, 2026
@fengmk2 fengmk2 marked this pull request as ready for review March 26, 2026 15:59
@fengmk2 fengmk2 requested review from branchseer and cpojer March 26, 2026 15:59
Copy link
Member Author

fengmk2 commented Mar 26, 2026

Before merging, I will first release a test version for manual verification.

Copy link
Member Author

fengmk2 commented Mar 27, 2026

Windows test passimage.png

@fengmk2 fengmk2 added the test: e2e Auto run e2e tests label Mar 27, 2026
@graphite-app
Copy link

graphite-app bot commented Mar 27, 2026

Merge activity

## Summary

- Skip the git-hook prompt in `vp config` when `staged` config already exists in `vite.config.ts` — the project has already opted into hooks
- Recognize `postinstall` lifecycle in addition to `prepare` — projects that call `vp config` from `postinstall` (e.g. [npmx.dev](https://github.com/npmx-dev/npmx.dev/blob/main/package.json#L26)) now auto-install hooks without prompting
- Add `vp config` hooks setup flow diagram and prompt decision table to RFC

## Test plan

- [x] New snap test `command-config-auto-hooks` — verifies auto-install when staged config exists (no lifecycle env)
- [x] New snap test `command-config-postinstall-auto-hooks` — verifies auto-install from postinstall lifecycle
- [x] All existing `command-config-*` snap tests pass unchanged

Closes #1154
@graphite-app graphite-app bot force-pushed the auto-set-git-core-hooksPath branch from c267e06 to 118e3f4 Compare March 27, 2026 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: e2e Auto run e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vp create: skip git-hook prompt when staged config already exists

2 participants