# AI Code Review on Every Pull Request

Source: https://maito.app/workflows/review-a-teammates-pull-request

Maito reads a pull request's diff and the code around it, leaves comments on bugs and missing tests, and flags risks like a migration.

Get a first review that catches bugs and missed cases before a person looks.

[Engineering](https://maito.app/workflows/team/engineering) · [Software](https://maito.app/workflows/industry/software) · When something happens · Updated October 19, 2026

Works with

-   Slack
-   Email

## 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

1.  Read the change and the code around it
2.  Look for bugs, missing tests and risky changes
3.  Comment on the pull request

## Example

Loop run: Pull request opened · #881 Add coupon codes to checkout

**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

When something happens Review a teammate's pull request

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

### Does it approve or merge?

No. It leaves comments. Approval and merging stay with your team.

### Does it read the whole codebase?

It reads the diff and the code the change touches, including related files such as migrations.

### Can it run on every PR?

Yes. You can set it to run when a pull request opens, or mention it for specific ones.

## More engineering workflows

-   [Turn a ticket into a tested pull request Hand over a well-scoped ticket and get back a pull request with tests. Engineering · When you ask Works with Linear, Jira.](https://maito.app/workflows/turn-a-ticket-into-a-tested-pull-request)
-   [Check a change for security problems Look at a change for injection, leaked secrets and missing permission checks. Engineering · When you ask Works with Slack, Email.](https://maito.app/workflows/check-a-change-for-security-problems)
-   [Write the changelog Twice a week, turn merged pull requests into a changelog people can read. Engineering · On a schedule Works with Slack, Email.](https://maito.app/workflows/write-the-changelog)
-   [Nudge stale pull requests Pull requests waiting too long get a polite reminder to the right reviewer. Engineering · On a schedule Works with Slack, Email.](https://maito.app/workflows/nudge-stale-pull-requests)
-   [File a bug from a Slack thread When a bug comes up in chat, mention Maito and it gets filed once, with details and no duplicates. Engineering · When you ask Works with Linear, Jira.](https://maito.app/workflows/file-a-bug-from-a-slack-thread)
-   [Draft the incident postmortem Turn the incident channel and logs into a postmortem draft. Engineering · When you ask Works with Datadog, Sentry.](https://maito.app/workflows/draft-the-incident-postmortem)

[See all workflows](https://maito.app/workflows)

## Put your AI teammate to work.

Set it up in minutes. Start with this one, and let it earn the next one.

[Put Maito to work](https://maito.app/login?returnTo=%2Fworkflows%2Freview-a-teammates-pull-request)[Book a demo](mailto:support@maito.app?subject=Maito%20demo)
