fix: make auto-review post (track_progress), trigger on ready, skip drafts#148
Open
amdove wants to merge 5 commits into
Open
fix: make auto-review post (track_progress), trigger on ready, skip drafts#148amdove wants to merge 5 commits into
amdove wants to merge 5 commits into
Conversation
Two fixes so the auto-review actually runs and posts: - Add ready_for_review to triggers so switching a draft PR to ready runs a review (previously only fired on opened). - Add Read,Glob,Grep to --allowedTools. Without Read, Claude cannot open .claude/review-guidelines.md (referenced by the prompt), hits permission denials, and completes without posting any review. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the narrow --allowedTools allowlist with a --disallowedTools denylist. The allowlist omitted tools Claude needs (notably Read, to open .claude/review-guidelines.md), causing permission denials and a silent no-post. The denylist keeps claude-code-action's default tools and blocks only mutation/shell/network. Mirrors the review-actions config used by ptd-config, which posts reviews reliably. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move the bot-author check to a job-level guard and add a draft guard so reviews don't run on draft PRs. On ready_for_review the PR is no longer draft, so the review still runs when a draft is marked ready. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
In automation mode (a prompt is supplied) claude-code-action runs the review but does not publish it to the PR unless track_progress is true. Runs were completing with 0 denials but posting nothing. This mirrors the posit-dev/review-actions wrapper used by ptd-config, which sets track_progress and posts reliably. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The mcp__github__create_pending_pull_request_review flow + Bash denylist was not the documented way to post an automated review with the raw action. Match examples/pr-review-comprehensive.yml: - allowedTools: mcp__github_inline_comment__create_inline_comment + Bash(gh pr comment/diff/view) + Read/Glob/Grep (for the guidelines file) - prompt: inline comments for line feedback, top-level gh pr comment for general notes, comment-only (no approve/deny) - track_progress: true (required so automation-mode reviews post) Co-Authored-By: Claude Sonnet 4.6 <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.
Consolidated fixes so the auto-review actually runs and posts:
track_progress: "true"— the key fix. In automation mode claude-code-action runs the review but doesn't publish it without this; runs were completing with 0 denials but posting nothing. Mirrors the review-actions wrapper used by ptd-config.ready_for_review— previously onlyopened, so draft→ready did nothing.!github.event.pull_request.draft, consolidated with the existing bot-author check into one job-levelif..claude/review-guidelines.mdand repo files (was hitting permission denials and bailing).