[wrangler] Avoid eager zone lookups when deploying routes #993
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Changeset Review | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, labeled, unlabeled] | |
| paths: | |
| - ".changeset/*.md" | |
| workflow_dispatch: | |
| inputs: | |
| pr_number: | |
| description: "PR number to review" | |
| required: true | |
| type: number | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| issues: write | |
| id-token: write | |
| jobs: | |
| review-changesets: | |
| runs-on: ubuntu-latest | |
| if: github.event.pull_request.head.repo.full_name == github.repository && !contains(github.event.pull_request.labels.*.name, 'skip-changeset-review') && !contains(github.event.pull_request.labels.*.name, 'no-changeset-required') | |
| steps: | |
| - name: Checkout PR branch | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get changed changeset files | |
| id: changed-changesets | |
| uses: tj-actions/changed-files@v45 | |
| with: | |
| files: | | |
| .changeset/*.md | |
| files_ignore: | | |
| .changeset/README.md | |
| # Recover deleted files so Claude can read them (needed for Version Packages PRs) | |
| recover_deleted_files: ${{ github.event.pull_request.title == 'Version Packages' }} | |
| - name: Review Changesets with Claude | |
| id: claude-review | |
| # Run for Version Packages PRs (which delete changesets) or regular PRs with new changesets | |
| if: github.event.pull_request.title == 'Version Packages' || steps.changed-changesets.outputs.added_files_count > 0 | |
| uses: anthropics/claude-code-action@v1.0.22 | |
| with: | |
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | |
| allowed_bots: "devin-ai-integration[bot]" | |
| use_sticky_comment: true | |
| prompt: | | |
| Review the changeset files in this PR. | |
| For "Version Packages" PRs, review: ${{ steps.changed-changesets.outputs.deleted_files }} | |
| For regular PRs, review: ${{ steps.changed-changesets.outputs.added_files }} | |
| Read `.changeset/README.md` for guidelines, then validate: | |
| 1. **Version Type**: Correct patch/minor/major (major forbidden for wrangler) | |
| 2. **Changelog Quality**: Meaningful descriptions with examples for features | |
| 3. **Markdown Headers**: No h1/h2/h3 headers (breaks changelog formatting) | |
| 4. **Analytics**: If the change collects more analytics, it should be a minor even though there is no user-visible change | |
| 5. **Dependabot**: Do not validate dependency update changesets for create-cloudflare | |
| If all changesets pass, just output "✅ All changesets look good" - no need for a detailed checklist. | |
| Do not review other files, only the changesets. This is specifically a changeset review action. | |
| If there are issues, output "⚠️ Issues found" followed by the specific problems. | |
| If the user has attached an image, use the Read tool to view it. If and only if it's a cute animal, include in your comment a short cuteness report in the style of WeRateDogs (e.g., "This is Barkley. He's wearing a tiny hat and doesn't know why. 13/10"). If it's not an animal, silently ignore the image. If there is more than one image, check each one to find an animal. If you do not find an animal, do not include any reference to a cuteness report. | |
| Return your structured output indicating whether there are blocking issues. | |
| claude_args: | | |
| --allowedTools "Read,Glob,Grep" | |
| --output-format json | |
| --json-schema '{"type":"object","properties":{"has_blocking_issues":{"type":"boolean","description":"True if any changeset has blocking issues that should fail the check"},"summary":{"type":"string","description":"One-line summary of the review"},"issues":{"type":"array","items":{"type":"object","properties":{"file":{"type":"string"},"issue":{"type":"string"},"severity":{"type":"string","enum":["blocking","warning"]}}}}},"required":["has_blocking_issues","summary"]}' | |
| - name: Skip notice | |
| if: github.event.pull_request.title != 'Version Packages' && steps.changed-changesets.outputs.added_files_count == 0 | |
| run: | | |
| echo "No new changesets to review (only minor edits to pre-existing changesets detected)" | |
| - name: Fail if blocking issues found | |
| if: always() && steps.claude-review.outputs.structured_output != '' && fromJSON(steps.claude-review.outputs.structured_output).has_blocking_issues == true | |
| run: | | |
| echo "::error::Blocking changeset issues found. Please fix the issues identified in the Claude review comment." | |
| exit 1 |