Skip to content

Add GitHub Actions workflow for Antigravity AI code review - #9284

Merged
dschuff merged 3 commits into
mainfrom
agy-review
Oct 21, 2026
Merged

dschuff merged 3 commits into
mainfrom
agy-review

Conversation

@dschuff

@dschuff dschuff commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

This tool runs an antigravity github action with a custom prompt that will post review comments on PRs. It's currently configured to run automatically on PRs posted by contributors, and will run on-demand when a contributor posts a comment with the content "/review"

@dschuff
dschuff requested a review from a team as a code owner October 20, 2026 05:36
@dschuff
dschuff requested review from tlively and removed request for a team October 20, 2026 05:36
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 Google Antigravity Code Review

I have reviewed the changes in this Pull Request and left inline feedback.

Comment thread .github/workflows/ai-review.yml
Comment thread .github/workflows/ai-review.yml
Comment thread .github/workflows/ai-review.yml
@dschuff

dschuff commented Oct 20, 2026 •

Copy link
Copy Markdown
Member Author

This is another option for automated review. It looks like it works purely from actions. I tried it in my fork and it seems to work. Reviews look like this.

@tlively

tlively commented Oct 20, 2026

Copy link
Copy Markdown
Member

Cool, should we just enable this in addition to Gemini Code Assist and see which one is better? @kripken

@kripken

kripken commented Oct 20, 2026

Copy link
Copy Markdown
Member

Definitely worth experimenting with, but according to the bot's own feedback, (1) this risks exposing the secret key, and (2) does not expose the secret key so external PRs will not get reviewed. Do these not contradict each other..? 😆 Also, each sounds rather serious...

@dschuff

dschuff commented Oct 20, 2026

Copy link
Copy Markdown
Member Author

The first comment is not about exposing the key per se, but allowing anyone to post a comment and trigger review on a PR that they don't own. As the comment notes, this allows redundant overuse of the API but not key leaks. Because the 3rd comment is also correct; secrets are not passed to forked pull requests. This seems more problematic actually, and maybe it's the real reason why a Github App like Gemini Code Assist could be better for external reviews. Let me see if there's a solution here.

@dschuff

dschuff commented Oct 20, 2026

Copy link
Copy Markdown
Member Author

OK actually there's one additional subtlety here:

  1. workflows run on: pull_request run in the untrusted context of the external fork, so no secrets get passed and review won't work directly.
  2. on: issue_comment runs on main in the base repository, so it does have access to repository secrets. So as mentioned above the risk isn't secret leakage but quota abuse. But it does mean that we can still cause reviews to happen on forked PRs by adding the /review comment. I just uploaded a commit that adds extra checks to limit who can trigger the reviews. It also fixes the checkout so we get the PR commit even when triggered by the comment (that's comment 2).

@dschuff

dschuff commented Oct 20, 2026

Copy link
Copy Markdown
Member Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 Google Antigravity Code Review

I have reviewed the changes in this Pull Request and left inline feedback.

Comment thread .github/workflows/ai-review.yml Outdated
Comment thread .github/workflows/ai-review.yml Outdated
@dschuff

dschuff commented Oct 20, 2026

Copy link
Copy Markdown
Member Author

Fixed these issues. IIUC this will automatically trigger a review for non-forked PRs for contributors, but we could also just only trigger reviews via comments for everyone.

@tlively

tlively commented Oct 20, 2026

Copy link
Copy Markdown
Member

/review

@dschuff

dschuff commented Oct 20, 2026

Copy link
Copy Markdown
Member Author

Interesting that the review is triggered by your comment, but then it doesn't post that it actually reviewed and didn't find anything, you have to look at the log to see it.

@tlively tlively left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM for experimentation.

@dschuff

dschuff commented Oct 21, 2026

Copy link
Copy Markdown
Member Author

One thing to clarify before we land it: Would you prefer to have it automatically run for collaborators, or make it only review on demand even for us?

@tlively

tlively commented Oct 21, 2026

Copy link
Copy Markdown
Member

Automatically running is fine for now. I expect we'll fine tune all this once we have more experience with the different tools.

@dschuff
dschuff merged commit 4c6b554 into main Oct 21, 2026
17 checks passed
@dschuff
dschuff deleted the agy-review branch October 21, 2026 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants