refactor(init): split init flows into separate functions #2715
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: Claude Code Review | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| jobs: | |
| claude-review: | |
| if: >- | |
| !contains(github.event.pull_request.labels.*.name, 'skip-review') && | |
| github.actor != 'squiggler[bot]' && | |
| github.actor != 'squiggler-app[bot]' && | |
| (github.actor != 'renovate[bot]' || contains(github.event.pull_request.labels.*.name, '⚠️ major')) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| issues: read | |
| id-token: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: Read review prompt | |
| id: review-prompt | |
| run: | | |
| { | |
| echo 'content<<PROMPT_EOF' | |
| cat .claude/commands/review.md | |
| echo PROMPT_EOF | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Run Claude Code Review | |
| if: github.actor != 'renovate[bot]' | |
| id: claude-review | |
| uses: anthropics/claude-code-action@df37d2f0760a4b5683a6e617c9325bc1a36443f6 # v1 | |
| with: | |
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | |
| track_progress: true | |
| prompt: | | |
| REPO: ${{ github.repository }} | |
| PR NUMBER: ${{ github.event.pull_request.number }} | |
| ${{ steps.review-prompt.outputs.content }} | |
| use_sticky_comment: true | |
| claude_args: | | |
| --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*), Bash(gh pr diff:*), Bash(gh pr view:*)" | |
| allowed_bots: 'cursor,renovate' | |
| - name: Run Claude Review for Renovate Major Update | |
| if: github.actor == 'renovate[bot]' | |
| id: claude-review-renovate | |
| uses: anthropics/claude-code-action@df37d2f0760a4b5683a6e617c9325bc1a36443f6 # v1 | |
| with: | |
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | |
| track_progress: true | |
| prompt: | | |
| REPO: ${{ github.repository }} | |
| PR NUMBER: ${{ github.event.pull_request.number }} | |
| This is a Renovate PR for a MAJOR dependency upgrade. Your job is to ensure | |
| the upgrade does not break anything in this codebase. | |
| Steps: | |
| 1. From the PR diff, identify which package(s) were upgraded and from/to which major versions. | |
| 2. Look up the changelog or release notes for each upgraded package to understand | |
| breaking changes, removed APIs, renamed exports, and behavioral changes. | |
| 3. Search the entire codebase for all usages of the upgraded package(s) — imports, | |
| function calls, type references, configuration, etc. | |
| 4. For each usage found, verify it is compatible with the new major version. | |
| Flag any code that uses removed or changed APIs. | |
| 5. Check if any peer dependencies, configuration files, or build tooling need | |
| updates to match the new major version. | |
| For each issue found: | |
| - State the problem in 1-2 sentences | |
| - Provide the fix or recommendation | |
| - Include file paths and line numbers | |
| If everything looks compatible, confirm that all usages have been reviewed and | |
| no changes are needed. Keep the review concise and actionable. | |
| use_sticky_comment: true | |
| claude_args: | | |
| --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*), Bash(gh pr diff:*), Bash(gh pr view:*)" | |
| allowed_bots: 'cursor,renovate' |