How to prevent claude from reviewing its own code? #493
|
Claude automatically reviews their own code, when I open a PR. It is full or prise for the genius of the PRs code etc.. It is a quite pathetic to be honest and a waste of tokens. How to make Claude only review a PR if it was written (not only opened) by a human or other AI? |
Answered by
chasewhughes
Mar 28, 2026
Replies: 1 comment
|
Add an name: Claude Auto Review
on:
pull_request:
types: [opened, synchronize]
jobs:
review:
if: github.event.pull_request.user.type != 'Bot'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
If you only want to skip Claude specifically (and still review Dependabot PRs, for example): if: github.event.pull_request.user.login != 'claude[bot]'No claude-code-action-specific configuration needed — this is standard GitHub Actions conditional logic. |
0 replies
Answer selected by
levino
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add an
ifcondition to your review job to skip bot-authored PRs:github.event.pull_request.user.typeis"Bot"for all GitHub App bot accounts —claude[bot],dependabot[bot],renovate[bot], etc. This skips all of them.If you only want to skip Claude specifically (and…