| [ Web Proxy ] |
| Viewing: https://developers.cloudflare.com/workers/ci-cd/builds/automatic-prs/ | [Back] [Original] |
Workers Builds can automatically create pull requests in your repository to configure your project or resolve deployment issues.
When you connect a repository that does not have a Wrangler configuration file, Workers Builds runs wrangler deploy which triggers automatic project configuration. Instead of failing, it creates a pull request with the necessary configuration for your detected framework.
Note
A configuration PR is only created when your deploy command is npx wrangler deploy. If you have a custom deploy command, autoconfig will still run and configure your project, but no PR will be created.
Without the configuration in your repository, every build has to run autoconfig first, which means your project gets built twice - once during autoconfig to generate the configuration, and again for the actual deployment. Merging the PR commits the configuration to your repository, so future builds skip autoconfig and go straight to building and deploying. This results in faster deployments and version-controlled settings.
[Example of an automatic configuration pull request created by Workers Builds]
The configuration PR may contain changes to the following files, depending on your framework:
wrangler.jsonc - Wrangler configuration file with your Worker settings@astrojs/cloudflare for Astro)astro.config.mjs for Astro or svelte.config.js for SvelteKit)package.json - New scripts like deploy, preview, and cf-typegen, plus required dependenciespackage-lock.json / yarn.lock / pnpm-lock.yaml - Updated lock file with new dependencies.gitignore - Entries for .wrangler and .dev.vars* files.assetsignore - For frameworks that generate worker files in the output directoryThe PR description includes:
Note
When you merge the PR, Workers Builds will update your build and deploy commands if they do not match the detected settings, ensuring successful deployments.
If Workers Builds detects a mismatch between your Worker name in the Cloudflare dashboard and the name field in your Wrangler configuration file, it will create a pull request to fix the conflict.
This can happen when:
name field in your config does not match the connected WorkerThe PR will update the name field in your Wrangler configuration to match the Worker name in the dashboard.
For more details, refer to the name conflict changelog.
When you receive a PR from Workers Builds:
| Web Proxy Viewer | New URL | Original Page |