Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
ci(claude): add Claude PR review + @claude responder workflows
Jose Ramirez89f28b594ccc
diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.ymlnew file mode 100644index 000000000..b612849eb--- /dev/null+++ b/.github/workflows/claude-code-review.yml@@ -0,0 +1,52 @@+name: Claude PR Review++# Automatic Claude review on every internal pull request.+#+# NOTE (public repo): PRs opened from forks do not receive repository secrets,+# so CLAUDE_CODE_OAUTH_TOKEN is unavailable for them. The `if:` guard on the job+# skips fork PRs to avoid a confusing red failure. External contributors can+# still request a review on demand by mentioning @claude (see claude.yml).++on:+ pull_request:+ types: [opened, synchronize, ready_for_review, reopened]++jobs:+ review:+ # Skip fork PRs (no secret access) and draft PRs.+ if: >-+ github.event.pull_request.head.repo.full_name == github.repository &&+ github.event.pull_request.draft == false+ runs-on: ubuntu-latest+ permissions:+ contents: read+ pull-requests: write+ id-token: write+ steps:+ - name: Checkout repository+ uses: actions/checkout@v6+ with:+ fetch-depth: 1++ - name: Claude PR review+ uses: anthropics/claude-code-action@v1+ with:+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}+ track_progress: true+ prompt: |+ REPO: ${{ github.repository }}+ PR NUMBER: ${{ github.event.pull_request.number }}++ Perform a focused code review of this pull request. Prioritize:++ 1. Correctness and edge cases — logic errors, off-by-one, null/error handling.+ 2. Security — input validation, auth/authz, secret handling, injection.+ 3. Performance — obvious bottlenecks, N+1 queries, resource leaks.+ 4. Tests — coverage for new behavior and important edge cases.+ 5. Clarity — readability and maintainability of the changed code.++ Leave inline comments for specific issues and a short top-level+ summary. Be concise; skip praise-only comments. If the change looks+ good, say so briefly.+ claude_args: |+ --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.ymlnew file mode 100644index 000000000..0b7a44921--- /dev/null+++ b/.github/workflows/claude.yml@@ -0,0 +1,41 @@+name: Claude Code++# On-demand Claude, triggered by an @claude mention in an issue, PR comment,+# or PR review. This is the path external (fork) contributors can use, since the+# automatic review in claude-code-review.yml skips fork PRs (no secret access).++on:+ issue_comment:+ types: [created]+ pull_request_review_comment:+ types: [created]+ issues:+ types: [opened, assigned]+ pull_request_review:+ types: [submitted]++jobs:+ claude:+ if: >-+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||+ (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||+ (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||+ (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))+ runs-on: ubuntu-latest+ permissions:+ contents: write+ pull-requests: write+ issues: write+ id-token: write+ actions: read # Required for Claude to read CI results on PRs+ steps:+ - name: Checkout repository+ uses: actions/checkout@v6+ with:+ fetch-depth: 1++ - name: Run Claude Code+ id: claude+ uses: anthropics/claude-code-action@v1+ with:+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}