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.
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{
"kind": "github",
"events": ["pull_request.opened", "pull_request.synchronize"],
"branch_patterns": ["main"]
}Watch it work, then read what comes back
GET /o/{org}/sessions/{session}/eventsevent: tool_usebash · gh pr checkout 212event: tool_usebash · bun test paymentsevent: tool_result46 passed, 1 failedevent: thinkingThe refund path skips the currency check.event: messagePosted a review with 3 findings.GET /o/{org}/sessions/{session}- status
completed- result
Review posted on #212: 3 findings, 1 failing test- total_cost_usd
0.41
Steps
- 01
Connect the repository
Install the Rush GitHub App on the repository and create a Project for it.
- 02
Add the automation
In the Project, add an automation with the prompt above and a GitHub trigger on
pull_request.openedandpull_request.synchronize. Only work by an owner, member or collaborator fires it; pull requests from forks never do. - 03
Open a pull request
Each push starts a run. Follow it live from the Project's run list, or let it finish.
- 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
Related
All use casesWrite the missing tests
A PR with passing checks
A nightly schedule starts an agent that finds untested code, writes the tests and opens a pull request by morning.
Open the recipeFix a bug from an alert
A PR with checks
Your alerting posts to a webhook trigger; an agent reproduces the failure, fixes it and opens a pull request with the checks passing.
Open the recipe