Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/ai-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: 'Google Antigravity Code Review'

on:
pull_request:
types: [opened, synchronize, reopened]
issue_comment:
types: [created]

permissions:
contents: read
pull-requests: write

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.issue.number || github.ref }}
cancel-in-progress: true

jobs:
review:
name: 'Antigravity AI Code Review'
# 1. Run automatically for internal PRs where secrets exist
# 2. For external fork PRs, run when an authorized member comments '/review'
if: |
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
(github.event_name == 'issue_comment' &&
Comment thread
dschuff marked this conversation as resolved.
github.event.issue.pull_request &&
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association) &&
contains(github.event.comment.body, '/review'))
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
Comment thread
dschuff marked this conversation as resolved.
with:
ref: ${{ github.event_name == 'issue_comment' && format('refs/pull/{0}/head', github.event.issue.number) || github.event.pull_request.head.sha }}

- name: Run Antigravity Review Agent
uses: anguillanneuf/run-antigravity-cli@126f1bc7865cbcf3784cf764c96d3eb7f4d0b5d9 # master
with:
api-key: ${{ secrets.GEMINI_API_KEY }}
Comment thread
dschuff marked this conversation as resolved.
github-token: ${{ secrets.GITHUB_TOKEN }}
model: 'gemini-flash-latest'
fail-on-error: true
min-severity: 'MEDIUM'
min-confidence: '3'
custom-prompt: |
You are reviewing a Pull Request for Binaryen, a WebAssembly compiler and toolchain infrastructure library written in C++.
Focus on:
1. WebAssembly specification compliance, validation rules, and proper typing.
2. Soundness of compiler optimization passes, AST/IR transformations, and Module invariants.
3. Memory safety, bounds checks, null pointer dereferences, integer overflow, and clean error handling.
4. Performance traps and edge cases in parser, binary reader/writer, and interpreter.
5. Adherence to Binaryen C++ conventions while avoiding superficial style nitpicks.
Loading