ops: review pull requests with Claude Code - #66
Merged
Merged
Conversation
The workflow runs the code-review plugin and posts each finding as an inline comment. A fork pull request gets no secrets on a public repository, so the job skips those runs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The CI review reads this file on every pull request. It holds the layer boundaries, the ID and secret rules, and the paths the review must skip. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Turns on automated review on every pull request, and gives the reviewer the project rules it needs to be useful.
What this adds
.github/workflows/claude-code-review.ymlruns thecode-reviewplugin throughanthropics/claude-code-action@v1and posts each finding as an inline comment on the line it found.Three changes from the documented example:
timeout-minutes: 30, so a stuck run cannot bill indefinitely.concurrencywithcancel-in-progress, so a fast series of pushes does not stack paid runs on a pull request.ifguard on the head repository. This repository is public, and GitHub keeps secrets away from a run that a fork pull request starts, so those runs would fail on the missing token. The guard skips them instead.CLAUDE.mddescribes the layer boundaries, the ID and secret conventions, the migration rules, and the paths the review must skip. The review reads it on every run.Before this works
The workflow needs two things that are not in this branch:
CLAUDE_CODE_OAUTH_TOKENrepository secret, fromclaude setup-tokenUntil the secret exists the job runs and fails on authentication. Nothing blocks a merge, because the job sets no required check.
Cost
The OAuth token draws on the Claude subscription rate limits, so a review costs GitHub Actions minutes and no separate bill. An
ANTHROPIC_API_KEYsecret would bill API usage instead; the action prefers the API key when both are set.🤖 Generated with Claude Code