KEMBAR78
fix(create-cloudflare): bypass git hooks during initial commit by devin-ai-integration[bot] · Pull Request #10914 · cloudflare/workers-sdk · GitHub
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

@devin-ai-integration
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

@changeset-bot
Copy link

changeset-bot bot commented Oct 8, 2025

🦋 Changeset detected

Latest commit: 666bd6f

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

@pkg-pr-new
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: 666bd6f

@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
@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Oct 13, 2025
Fixes #8914 by adding a flag to git commit command that skips
pre-commit hooks during project initialization.

Co-Authored-By: smacleod@cloudflare.com <smacleod@cloudflare.com>
@petebacondarwin petebacondarwin force-pushed the devin/1759883888-fix-git-commit-no-verify branch from c3e2012 to 666bd6f Compare October 15, 2025 09:53
@petebacondarwin petebacondarwin merged commit 890a606 into main Oct 15, 2025
41 of 43 checks passed
@petebacondarwin petebacondarwin deleted the devin/1759883888-fix-git-commit-no-verify branch October 15, 2025 12:08
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Oct 15, 2025
@workers-devprod workers-devprod added the contribution [Holopin] Recognizes an open-source contribution, big or small label Oct 15, 2025
@holopin-bot
Copy link

holopin-bot bot commented Oct 15, 2025

Congratulations @devin-ai-integration[bot], the maintainer of this repository has issued you a holobyte! Here it is: https://holopin.io/holobyte/cmgry6gw6001yjx05zoje6yex

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution [Holopin] Recognizes an open-source contribution, big or small

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

wrangler init breaks if a global git hook fails

3 participants