Skip to content

Extract Pages functions build logic into its own package #1329

Extract Pages functions build logic into its own package

Extract Pages functions build logic into its own package #1329

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**: Accept the author's choice of patch/minor unless clearly incorrect
2. **Changelog Quality**: Meaningful descriptions (examples encouraged but not required 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.
claude_args: |
--allowedTools "Read,Glob,Grep"
- 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)"