Skip to content

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Fixes #8914.

This PR fixes an issue where create-cloudflare (used by wrangler init) fails when users have global git pre-commit hooks configured. The failure occurs during the initial git commit step of project initialization.

Changes

  • Added --no-verify flag to the git commit command in packages/create-cloudflare/src/git.ts
  • Updated the corresponding test to expect the new flag
  • Added changeset documenting the bugfix

Why --no-verify?

Using --no-verify is appropriate here because:

  1. This is automated tooling generating an initial commit during project scaffolding
  2. Users' global pre-commit hooks may not be relevant or compatible with the newly created project structure
  3. This prevents project initialization from failing due to unrelated git hook configurations
  4. It's a common pattern in automated tooling to bypass hooks during setup operations

Testing

  • All existing tests pass, including the updated test that validates the --no-verify flag is used
  • The fix specifically targets the gitCommit function which is only called during project initialization

Link to Devin run: https://app.devin.ai/sessions/93d529e93be849a1856e6faab17a6673
Requested by: @smacleod


  • Tests
    • Tests included
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: this is a bugfix that doesn't change user-facing behavior - the tool just works in more environments now
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: this is a create-cloudflare specific fix that doesn't affect Wrangler directly

Fixes #8914 by adding a flag to git commit command that skips
pre-commit hooks during project initialization.

Co-Authored-By: [email protected] <[email protected]>
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link

changeset-bot bot commented Oct 8, 2025

🦋 Changeset detected

Latest commit: c3e2012

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

pkg-pr-new bot commented Oct 8, 2025

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@10914

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@10914

miniflare

npm i https://pkg.pr.new/miniflare@10914

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@10914

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@10914

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@10914

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@10914

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@10914

wrangler

npm i https://pkg.pr.new/wrangler@10914

commit: c3e2012

@devin-ai-integration devin-ai-integration bot marked this pull request as ready for review October 8, 2025 01:37
@devin-ai-integration devin-ai-integration bot requested a review from a team as a code owner October 8, 2025 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Untriaged
Development

Successfully merging this pull request may close these issues.

wrangler init breaks if a global git hook fails
0 participants