Skip to content

feat(automoderator): init bot #41

feat(automoderator): init bot

feat(automoderator): init bot #41

name: Claude Code Review
on:
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
jobs:
claude-review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: 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:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
track_progress: true
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}
Review this pull request with a focus on:
- Correctness bugs and edge cases
- Code quality and adherence to this repo's CLAUDE.md conventions
- Security implications
- Performance considerations
Provide detailed feedback using inline comments for specific issues.
# Interactive-session tools (ScheduleWakeup/SendMessage/Monitor, background
# Agent/Task execution) assume a persistent host that re-invokes the session
# later. This action runs the SDK once per job and exits when the turn ends,
# so the run silently reports success with no review ever posted. Upstream:
# anthropics/claude-code-action#1462, #1499.
claude_args: |
--model claude-opus-4-8
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"
--disallowedTools "ScheduleWakeup,SendMessage,Monitor"
--append-system-prompt "This session runs once inside a GitHub Actions job and cannot be resumed or notified later. Never call Agent or Task without run_in_background: false. Do not end your turn assuming a background subagent or scheduled wakeup will continue the work -- it will not. Wait for every subagent synchronously and only finish once the actual deliverable (the PR review) has been produced."
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options