Enable code review workflow to post comments on PRs#3506
Conversation
The claude-code-action requires write access by default. Contributors without write access on the repo would get "User does not have write access on this repository" errors. Add allowed_non_write_users: "*" to allow reviews on all PRs, and change pull-requests permission from read to write so gh pr comment can actually post the review. https://claude.ai/code/session_01JKmBxggyJKLMhu8y1rQ8hZ
|
Review Summary: A minimal, well-targeted fix that correctly enables the code review workflow to post PR comments. The two changes are both necessary and appropriate. DetailsChange 1:
|
| Assessment | |
|---|---|
| Code quality | ✅ Minimal and clean |
| Correctness | ✅ Both changes are required for the stated goal |
| Security | ✅ workflow_run pattern safely isolates secrets; minor prompt injection risk is pre-existing |
| Performance | ✅ No concerns |
| Tests | N/A — GitHub Actions workflow change; verified by next PR run |
This looks good to merge.
Description
This PR updates the Claude code review GitHub Actions workflow to enable posting review comments on pull requests.
Changes Made
Workflow Permission Update:
pull-requestspermission fromreadtowriteto allow the workflow to post review commentsWorkflow Configuration Update:
allowed_non_write_users: "*"parameter to the code review action to permit all users to trigger reviewsReason
These changes enable the automated code review workflow to post feedback directly as comments on pull requests, improving the review experience by making feedback visible in the PR conversation thread rather than only in workflow logs.
Test Plan
The workflow will be tested on the next pull request created in the repository. The code review action should successfully post comments on the PR with the new permissions in place.
https://claude.ai/code/session_01JKmBxggyJKLMhu8y1rQ8hZ