feat(iterate-pr): Auto-trigger review bots on draft PRs#100
Draft
feat(iterate-pr): Auto-trigger review bots on draft PRs#100
Conversation
Review bots (cursor, sentry, etc.) don't auto-run on draft PRs, requiring manual "@botName review" comments after each push. This adds a trigger_review_bots.py script that: - Detects active review bots by scanning review/comment authors from the last 10 merged PRs via a single GraphQL query - Posts trigger comments only on draft PRs (exits early otherwise) - Minimizes previous trigger comments before posting new ones to keep the PR conversation clean - Uses a hardcoded trigger map (extensible) for known Sentry bots The workflow is updated to run the script both at startup (step 2) and after each push (step 7). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Eliminate duplicated subprocess.run boilerplate by reusing the existing run_gh() helper for GraphQL and REST API calls. Co-Authored-By: Claude Opus 4.6 (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.
Summary
trigger_review_bots.pyscript that detects and triggers review bots on draft PRsWhy
Review bots (cursor, sentry) don't auto-run on draft PRs. Users have to manually post
@cursor review/@sentry reviewafter every push. This automates it by:Uses a hardcoded trigger map (
cursor→@cursor review,sentry→@sentry review) that's easy to extend.Test plan
is_draft: falseno_bots_found: true🤖 Generated with Claude Code