Add Claude Code review + @claude workflows

Ports the two Claude GitHub workflows from the bang repo (which narya lacked):
claude-code-review.yml auto-reviews PRs; claude.yml responds to @claude
mentions on issues/PRs. Review prompt tuned for narya (wire/streaming compat,
DObject/marshaller correctness, concurrency). Requires the
CLAUDE_CODE_OAUTH_TOKEN repo secret to authenticate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HhfHCXYp2ctWi76Z91y9Ut
This commit is contained in:
2026-07-05 22:35:49 +12:00
parent 7cbac80172
commit 1cf16721d6
2 changed files with 96 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
name: Claude Code
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: read
pull-requests: read
issues: read
id-token: write
actions: read # Required for Claude to read CI results on PRs
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
# Set the CLAUDE_CODE_OAUTH_TOKEN secret on this repo (Settings >
# Secrets and variables > Actions) for this to authenticate.
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
# This is an optional setting that allows Claude to read CI results on PRs
additional_permissions: |
actions: read