Bugfix: replication shouldn't break if mfiles are closed #1554
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: Claude Code Review | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| paths: # Only run on specific file changes | |
| - "src/**/*.cr" | |
| - "static/**/*.js" | |
| workflow_dispatch: | |
| inputs: | |
| pr_number: | |
| description: 'PR number to review' | |
| required: true | |
| type: string | |
| jobs: | |
| claude-review: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| issues: read | |
| id-token: write | |
| actions: read # Required for Claude to read CI results on PRs | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.event.pull_request.head.ref || github.ref }} | |
| repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} | |
| - uses: anthropics/claude-code-action@v1 | |
| with: | |
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | |
| prompt: | | |
| REPO: ${{ github.repository }} | |
| PR_NUMBER: ${{ inputs.pr_number || github.event.pull_request.number }} | |
| Review this PR and report ONLY problems that need fixing. | |
| You have a maximum of 15 turns — finish well within that limit. | |
| Steps: | |
| 1. Run `gh pr diff` to read the changes | |
| 2. Analyze the diff. Only use Read/Glob/Grep if the diff alone is insufficient to understand a change. | |
| 3. Post findings with `gh pr comment --edit-last` (to update any previous review), or `gh pr comment` if no previous comment exists. | |
| Report only: | |
| - Bugs and logic errors | |
| - Security vulnerabilities | |
| - Performance issues (especially allocations in hot paths) | |
| - Missing error handling | |
| - Crystal anti-patterns | |
| If no problems found, say "No issues found." | |
| Do NOT: | |
| - Check CI status or previous commits | |
| - Run specs | |
| - Use emojis | |
| - Explore the codebase broadly — only read specific files when needed | |
| claude_args: | | |
| --model claude-opus-4-6 | |
| --max-turns 20 | |
| --allowedTools "Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Read,Glob,Grep" |