Files
narya/.github/workflows/claude-code-review.yml
T

54 lines
2.2 KiB
YAML

name: Claude Code Review
on:
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
jobs:
claude-review:
runs-on: ubuntu-latest
# pull-requests: write is required so `gh pr comment` and the inline-comment
# tool can post the review back onto the PR via GITHUB_TOKEN.
permissions:
contents: read
pull-requests: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@v1
with:
# Authenticates as the Claude subscription, so review usage is covered
# by the plan (no metered API charge). Set the CLAUDE_CODE_OAUTH_TOKEN
# secret on this repo (Settings > Secrets and variables > Actions).
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}
Review this pull request. narya is a Java distributed-object /
networking library (the Presents framework: DObjects, invocation
services/marshallers, the io streaming layer). Focus on:
- Correctness bugs and broken edge cases
- Wire-protocol / streaming compatibility (field order, Streamable
read/writeObject, backwards compatibility of serialized forms)
- Thread-safety and concurrency
- Security implications
- Code quality and existing project conventions
The PR branch is already checked out in the working directory.
Use `gh pr comment` for a short top-level summary.
Use `mcp__github_inline_comment__create_inline_comment` (with
`confirmed: true`) to flag specific lines.
Only post GitHub comments - do not return the review as a message.
If you find nothing worth flagging, post a brief "no issues found"
summary comment.
claude_args: |
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"