Skip to content

add a draft gemini review check - #40589

Merged
derrickaw merged 1 commit into
masterfrom
20261014_updateReviewBot
Oct 14, 2026
Merged

derrickaw merged 1 commit into
masterfrom
20261014_updateReviewBot

Conversation

@derrickaw

@derrickaw derrickaw commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Problem: When opening a draft PR and the user happens to request a /gemini review and then later on makes the PR ready for review, another gemini review occurs and possibly duplicates the previous findings, rebuttals etc. See #40587 for context.
Plan: add a check to the gemini review workflow to prevent duplicate reviews when switching from draft to ready for review states.

@github-actions github-actions Bot added the build label Oct 14, 2026
@derrickaw
derrickaw marked this pull request as ready for review October 14, 2026 18:09
@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @damccorm for label build.
Backup reviewer: Amar3tto (if the main reviewer is unresponsive, you can escalate to them by tagging their username)

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review Summary

This PR adds a pre-check step to the Gemini code review workflow to skip automatic reviews on the ready_for_review event if a Gemini review has already been posted on the PR (e.g., via /gemini review while in draft). The implementation cleanly reuses actions/github-script@v9 and properly gates the subsequent workflow steps.

🔍 General Feedback

  • The pagination over github.rest.pulls.listReviews and matching against github-actions[bot] and the /gemini review footer signature accurately identifies prior reviews from this workflow.
  • The conditional steps.check_draft_review.outputs.reviewed_in_draft != 'true' behaves as expected both when check_draft_review runs and when it is skipped on other trigger events.

💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.

Comment thread .github/workflows/gemini_code_review.yml
@derrickaw
derrickaw merged commit 515b622 into master Oct 14, 2026
10 checks passed
@derrickaw

derrickaw commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator Author

Verification that it works - #40594 (comment) - thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants