1
0
Fork 0
forked from mirror/openwrt
openwrt/.github/workflows/claude-code-review.yml
Hauke Mehrtens b048949114 github: pin claude-code-action to v1.0.49
Version 1.0.49 added support for PRs from forked repositories.
This feature was reverted in v1.0.50, see:
https://github.com/anthropics/claude-code-action/pull/937

v1.0.49 broke commits made by Claude, but we do not use that
feature. Pin to v1.0.49 until
https://github.com/anthropics/claude-code-action/pull/963 is merged
and released.

Fixes: c0e75c9de6 ("github: add Claude code review workflow triggered by /claude comment")
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-23 02:08:39 +01:00

33 lines
958 B
YAML

name: Claude Code Review
on:
issue_comment:
types: [created]
permissions:
contents: read
pull-requests: write
actions: read
jobs:
code-review:
name: Claude Code Review
# Only run on PR comments containing "/claude" from users with write access
if: >-
github.event.issue.pull_request &&
contains(github.event.comment.body, '/claude') &&
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'),
github.event.comment.author_association)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 1
- name: PR Review
uses: anthropics/claude-code-action@f669191d7d1e67f08a54b0c11cf5683a9a391951 # v1.0.49
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
trigger_phrase: "/claude"