Review a teammate's pull request
Get a first review that catches bugs and missed cases before a person looks.
Engineering · Software · When something happens · Updated
Works with
- Slack
How do you get a first code review on a pull request?
To get a first code review on a pull request, mention Maito on it. It reads the diff and the code around it, comments on likely bugs, missing tests and slow queries, and checks migrations for risks. You get comments on the pull request before a person looks.
How it's done today
Reviews wait a day and still miss things.
What Maito does
- Read the change and the code around it
- Look for bugs, missing tests and risky changes
- Comment on the pull request
Example
Loop run: Pull request opened · #881 Add coupon codes to checkout
First review of PR 881 (coupon codes, by Jess). 4 comments left on the pull request. • applyCoupon.ts line 48 crashes on percent coupons when cart.discount is null, which is what mobile carts send. • No test for an expired coupon. • couponLookup.ts line 112 queries per line item: about 40 queries on a 40-item cart. • Nit: rename couponData to coupon. Catch: migration 0087 adds a unique index on code, but case-sensitive. SAVE10 and save10 can both exist, and checkout matches case-insensitively. I read the diff and the checkout code around it. A person still needs to approve.
@Maito add the expired coupon test to my branch.
Pushed as a separate commit. It fails on the current code and passes with the null fix from comment 1.
Maito (3:41 PM):
First review of PR 881 (coupon codes, by Jess). 4 comments left on the pull request.
• applyCoupon.ts line 48 crashes on percent coupons when cart.discount is null, which is what mobile carts send.
• No test for an expired coupon.
• couponLookup.ts line 112 queries per line item: about 40 queries on a 40-item cart.
• Nit: rename couponData to coupon.
Catch: migration 0087 adds a unique index on code, but case-sensitive. SAVE10 and save10 can both exist, and checkout matches case-insensitively.
I read the diff and the checkout code around it. A person still needs to approve.
Jess (3:58 PM):
add the expired coupon test to my branch.
Maito (4:03 PM):
Pushed as a separate commit. It fails on the current code and passes with the null fix from comment 1.
How to set it up
- Ask your agent
“When a pull request opens in the api repo, review it and comment on the pull request. Look for bugs, missing tests and risky changes, then post a summary in #eng-reviews.”
What it won't do
It reads code and doesn't run your production system. It can miss design problems that only a teammate with context would see.
Questions
No. It leaves comments. Approval and merging stay with your team.
It reads the diff and the code the change touches, including related files such as migrations.
Yes. You can set it to run when a pull request opens, or mention it for specific ones.