Skip to content

Add Sync::Shared lock for @files and @checksums in Clustering::Server #1590

Add Sync::Shared lock for @files and @checksums in Clustering::Server

Add Sync::Shared lock for @files and @checksums in Clustering::Server #1590

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:
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'workflow_dispatch'
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@v6
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref || github.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
- name: Load review config
id: config
run: |
source .review-config
if [[ -z "$MODEL" || -z "$CRITERIA" ]]; then
echo "::error::.review-config must define MODEL and CRITERIA"
exit 1
fi
{
DELIM="EOF_$(openssl rand -hex 16)"
echo "criteria<<$DELIM"
cat "$CRITERIA"
echo "$DELIM"
echo "model=$MODEL"
} >> "$GITHUB_OUTPUT"
- 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.
${{ steps.config.outputs.criteria }}
claude_args: |
--model ${{ steps.config.outputs.model }}
--max-turns 20
--allowedTools "Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Read,Glob,Grep"