Repository navigation
Review every PR with Claude, including from authors without write access #2043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -185,11 +185,15 @@ jobs: | |
| with: | ||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||
| github_token: ${{ github.token }} | ||
| # Review every PR, not just those from authors with write access. The action | ||
| # otherwise stops on "Actor does not have write permissions"; it needs | ||
| # github_token above to honour this. allowed_bots stays empty, so bots still | ||
| # cannot trigger a review. | ||
| allowed_non_write_users: "*" | ||
| claude_args: > | ||
| --dangerously-skip-permissions | ||
| --max-turns 40 | ||
| --allowedTools | ||
| "Bash" | ||
| "Read,Write,Glob,Grep" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a non-write user opens a fork PR, this workflow feeds their diff and context into Claude; the CLI reference describes AGENTS.md reference: AGENTS.md:L4-L6 Useful? React with 👍 / 👎. |
||
| prompt: | | ||
| You are running in GitHub Actions review automation. | ||
|
|
||
|
|
@@ -208,10 +212,10 @@ jobs: | |
| - Do not comment on code outside the changed files, and do not give general repo suggestions or style nitpicks. | ||
|
|
||
| Required steps, in order; do not skip any: | ||
| 1) cat .claude/CLAUDE.md | ||
| 1) Read .claude/CLAUDE.md | ||
| 2) Read the Common Pitfalls section of docs/documentation/contributing.md. If the diff touches GPU macros or | ||
| src/simulation, also read docs/documentation/gpuParallelization.md. | ||
| 3) cat the changed files list and the diff. | ||
| 3) Read the changed files list and the diff. | ||
| 4) For each changed Fortran or Python file that has a context file, open it and check each changed hunk against | ||
| its surroundings: declarations, loop bounds, callers and callees within the file, comments that state what | ||
| the code does, and the matching code paths in other directions, targets or branches. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing
issue_commentarm at.github/workflows/claude-code-review.yml:24-28accepts@claude full reviewfrom any commenter, and this wildcard removes the action's non-write-user gate for that event as well as for PR creation. On any public PR, a non-bot account that neither authored nor maintains the PR can now post the phrase repeatedly and start a separate 40-turn OAuth-backed review each time, with no association, label, or rate check. Restrict the manual trigger to maintainers or authorized author associations, or separate its authorization policy from automatic PR reviews.Useful? React with 👍 / 👎.