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? |
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
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…