Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/claude-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,26 @@ jobs:
steps:
- name: Checkout caller repo
uses: actions/checkout@v6
with:
# Fetch the merge commit plus its parents so the PR head commit is
# available locally for the skip-marker check below.
fetch-depth: 2

- name: Check for skip marker
id: skip_check
run: |
message=$(git log -1 --format=%B "${{ github.event.pull_request.head.sha }}")
if grep -qiE '\[(skip[ -]claude|claude[ -]skip)\]' <<<"$message"; then
reason="Claude review skipped: the head commit message (${{ github.event.pull_request.head.sha }}) contains a skip marker such as [skip claude]. Remove the marker (or push a new commit without it) to run the review."
echo "::notice title=Claude review skipped::$reason"
echo "$reason" >> "$GITHUB_STEP_SUMMARY"
echo "skip=true" >> "$GITHUB_OUTPUT"
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi

- name: Run Claude Code review
if: steps.skip_check.outputs.skip != 'true'
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ jobs:

Required secret: `CLAUDE_CODE_OAUTH_TOKEN`.

To skip the review for a given push, include `[skip claude]` (or `[skip-claude]`,
`[claude skip]`, `[claude-skip]`) anywhere in the PR's most recent commit message. The check is
case-insensitive and looks only at the head commit, so pushing a later commit
without the marker re-enables review on the next run.

Optional input `additional_prompt` appends repo-specific guidance to the default
review prompt:

Expand Down