solicit-gemini-review
Solicit Gemini Review
Request a fresh review from Gemini Code Assist on the current PR.
Steps
-
Get PR number:
./scripts/agents/tooling/agentTool.ts getPrInfo --fields numberExtract the PR number from the JSON response.
-
Trigger Gemini review and wait:
./scripts/agents/tooling/agentTool.ts triggerGeminiReview --number $PR_NUMBERThis action:
- Posts a
/gemini reviewcomment on the PR - Polls every 15 seconds for up to 5 minutes (configurable via
--poll-timeout) - Returns JSON with status:
{"status": "review_received", "pr": N, "submitted_at": "..."}- Gemini responded{"status": "review_requested", "pr": N, "timed_out": true}- Timeout (review may still arrive)
- Posts a
-
Get review threads (if review was received):
./scripts/agents/tooling/agentTool.ts getReviewThreads --number $PR_NUMBERFilter for threads where the first comment is from
gemini-code-assist. -
Check for quota exhaustion: If Gemini's response contains "You have reached your daily quota limit":
-
Fall back to Codex review:
./scripts/agents/tooling/agentTool.ts solicitCodexReview -
Tag the PR with the fallback reviewer:
./scripts/agents/tooling/agentTool.ts tagPrWithReviewer --reviewer codex -
Report that Gemini quota was exhausted and Codex was used instead
If Gemini reviewed successfully (no quota issue), tag the PR with Gemini:
./scripts/agents/tooling/agentTool.ts tagPrWithReviewer --reviewer gemini -
-
Report: Output a summary of Gemini's review (or Codex review if fallback was used) and any specific comments.
Notes
- This is useful when you've made changes and want Gemini to re-review the PR
- Gemini will post new review comments if it finds issues
- Use
/address-gemini-feedbackafter this to handle any new feedback
Token Efficiency
The agentTool wrappers already use minimal JSON fields and handle output efficiently:
# Only fetch needed fields
./scripts/agents/tooling/agentTool.ts getPrInfo --fields number
# Review threads with pagination handled
./scripts/agents/tooling/agentTool.ts getReviewThreads --number $PR_NUMBER