Skip to content

Commit 2fef600

Browse files
committed
feat: simplify review workflow and output in GHA warning format
Rename workflow to automated-code-review.yml, revert to pull_request trigger for now (with TODO), and simplify maintainer checks. Update the review-pr skill to output warnings in GHA warning format targeting exact lines.
1 parent f9ab4ea commit 2fef600

2 files changed

Lines changed: 28 additions & 9 deletions

File tree

.github/workflows/antigravity-review.yml renamed to .github/workflows/automated-code-review.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
name: Antigravity Code Review
1+
name: automated code review
22

3+
# TODO: Eventually, use pull_request_target instead of pull_request.
4+
# pull_request_target runs in the base branch context and has access
5+
# to secrets (like GEMINI_API_KEY) even for fork PRs.
6+
# Using pull_request for now during setup/testing.
37
on:
4-
pull_request_target:
8+
pull_request:
59
types: [opened]
610
pull_request_review_comment:
711
types: [created]
@@ -14,21 +18,21 @@ jobs:
1418
review:
1519
runs-on: ubuntu-latest
1620
# Trigger only if:
17-
# 1. It is a pull_request_target event, it is NOT a draft, and the author is a maintainer
21+
# 1. It is a pull_request event, it is NOT a draft, and the author is a maintainer
1822
# (OWNER, MEMBER, or COLLABORATOR).
19-
# 2. OR it is an pull_request_review_comment event, the comment body has a line starting with "/review",
23+
# 2. OR it is a pull_request_review_comment event, the comment body has a line starting with "/review",
2024
# and the commenter is a maintainer.
2125
if: >
22-
(github.event_name == 'pull_request_target' && !github.event.pull_request.draft &&
23-
(github.event.pull_request.author_association == 'OWNER' || github.event.pull_request.author_association == 'MEMBER' || github.event.pull_request.author_association == 'COLLABORATOR')) ||
26+
(github.event_name == 'pull_request' && !github.event.pull_request.draft &&
27+
contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.pull_request.author_association)) ||
2428
(github.event_name == 'pull_request_review_comment' &&
2529
(startsWith(github.event.comment.body, '/review') || contains(github.event.comment.body, '\n/review')) &&
26-
(github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'COLLABORATOR'))
30+
contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association))
2731
steps:
28-
- name: Checkout PR Branch (Untrusted)
32+
- name: Checkout PR Branch
2933
uses: actions/checkout@v7
3034
with:
31-
ref: refs/pull/${{ github.event.pull_request.number }}/merge
35+
ref: ${{ github.event.pull_request.head.sha }}
3236
persist-credentials: false
3337

3438
- name: Checkout Reviewbot (Base Branch)

tools/private/reviewbot/skills/review-pr/SKILL.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ correctness, concurrency safety, system architecture, performance bottlenecks,
1111
and resource management. Do not comment on style nits or formatting issues
1212
that an automated formatter can handle. Be constructive and concise.
1313

14+
For every issue or improvement you identify, you MUST output the finding in the
15+
GitHub Actions workflow command warning format. Specify the exact file path
16+
and line number that the comment applies to.
17+
18+
Format each finding exactly as a single line to stdout matching this template:
19+
`::warning file={file_path},line={line_number},title={category}::{comment_body}`
20+
21+
Where:
22+
* `file_path` is the relative file path from the repository root.
23+
* `line_number` is the starting line number in the file where the comment applies.
24+
* `category` is a short tag for the type of issue (e.g., "Error Handling", "Correctness", "Performance").
25+
* `comment_body` is your constructive and concise feedback.
26+
27+
Do not write any markdown commentary outside of these GHA command formatted lines.
28+
1429
Follow these checklists during your review:
1530

1631
### General Quality & Architecture Checklist

0 commit comments

Comments
 (0)