On an eventNeeds a repository

Review every pull request

A review on the PR

Each pull request gets an agent that checks it out in its own sandbox, runs the tests and posts a review with the evidence.

View .md

Best for

  • Teams that want a second review before merge
  • Repositories with a test suite the agent can run

Uses

  • A connected GitHub repository
  • A Project
  • An automation with a GitHub trigger

Automation · Review pull requests

POST /o/{org}/p/{project}/automations/{automation}/triggers
promptReview this pull request. Check it out, run the tests, and post one review that cites file and line for every finding. Do not push commits.
{
  "kind": "github",
  "events": ["pull_request.opened", "pull_request.synchronize"],
  "branch_patterns": ["main"]
}
Fig. The automation: its prompt, and the trigger that starts a run. Field names are the API's.

Watch it work, then read what comes back

GET /o/{org}/sessions/{session}/events
event: tool_usebash · gh pr checkout 212
event: tool_usebash · bun test payments
event: tool_result46 passed, 1 failed
event: thinkingThe refund path skips the currency check.
event: messagePosted a review with 3 findings.
Fig. The live stream while it works. Event names are the stream's.
GET /o/{org}/sessions/{session}
status
completed
result
Review posted on #212: 3 findings, 1 failing test
total_cost_usd
0.41
Fig. The session when it ends. Field names are the API's.

Steps

  1. 01

    Connect the repository

    Install the Rush GitHub App on the repository and create a Project for it.

  2. 02

    Add the automation

    In the Project, add an automation with the prompt above and a GitHub trigger on pull_request.opened and pull_request.synchronize. Only work by an owner, member or collaborator fires it; pull requests from forks never do.

  3. 03

    Open a pull request

    Each push starts a run. Follow it live from the Project's run list, or let it finish.

  4. 04

    Read the review

    The review lands on the pull request. The run keeps its full record: every command it ran, the test output and what it cost.

In the API and the docs