ci: unblock AI-authored PRs (review gate + mention context) - #57
Merged
Conversation
Two gaps, both preventing reviews on AI-authored PRs: 1. claude-review.yml: extend the author_association gate to also allow PRs opened by claude[bot] (our issue-to-PR pipeline). The old gate skipped the review job entirely — AI-authored code was merging with no review, which is the OPPOSITE of what we want. See PR #55 which landed unreviewed due to this. 2. claude-mention.yml: inject PR/issue number, URL, kind, commenter login, and the full comment body into the prompt. In the pinned action version the triggering comment is not reliably forwarded as context, so an @claude mention like "review this PR" was producing "I don't see a specific task in this mention, could you share the PR number?" — the agent had no idea which PR fired the workflow. Gate safety: github.event.pull_request.user.login is set by GitHub's auth system from the actual PR author. GitHub reserves the [bot] suffix for apps and enforces globally unique app slugs, so claude[bot] is specifically Anthropic's Claude app (which has to be installed in the HarperFast org to open PRs here). Fork-triggered workflow runs have no access to secrets regardless, so even a hypothetical bypass has a read-only blast radius. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…n TODO Review feedback on #57: 1. A single `>` markdown blockquote only marks its first line as quoted; subsequent lines render as plain paragraphs. For a multi-line @claude request the agent still reads all content, but the prompt's visual framing is wrong. Swap to a fenced code block so the entire comment body renders as quoted text regardless of line count. 2. Add a TODO comment near the inline-injection block so the reason it exists doesn't become mystery-cruft six months from now. When claude-code-action reliably forwards the triggering comment as the prompt, this wrapper can collapse back to supplemental context. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Apr 23, 2026
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.
Summary
Fixes two gaps that let AI-authored PRs go unreviewed.
1.
claude-review.yml— extend author gate to includeclaude[bot]The gate used to be
author_association in {OWNER, MEMBER, COLLABORATOR}. PRs authored byclaude[bot](ourclaude-issue-to-prpipeline) hitauthor_association: NONEand the review job was SKIPPED. That's how PR #55 landed with no review — the case where review matters most.Gate is now:
2.
claude-mention.yml— inject PR/issue context into the promptWhen Nathan tried
@claude review this PRon #55, the mention workflow fired but the agent replied:The pinned action version isn't reliably surfacing the triggering comment as the prompt. Fix: inline
github.event.issue.number || github.event.pull_request.number, URL, target kind, commenter login, and the full comment body directly into the prompt string. Also adds an explicit branch for "if the request is 'review this PR'" that points the agent at.github/review-scopes/universal.mdfor discipline.Gate safety (for the review-side change)
github.event.pull_request.user.loginis set by GitHub from the actual PR author — not user-controlled[bot]suffix is reserved for GitHub Apps; human accounts can't have itclaude[bot]is specifically Anthropic's Claude app, which has to be installed in HarperFast to open PRs heresecrets.*, so any hypothetical bypass has read-only blast radius (worst case: a spam comment on a PR, not code execution or secret exfiltration)Test plan
@claude review this PRon any open PR — agent should read the PR and post a review, not ask "what PR?"🤖 Generated with Claude Code