Home › Coding › Automated PR review: how to do it with AI
Automated PR review: how to do it with AI
From official vendor pages; selected tasks also include dated logged-out free-plan trials. Report an error.
Intermediate Risk: Low 💻 Coding
AI pull-request review adds comments on bugs, unclear code and missing tests before a human reviewer looks. It's a useful first pass that catches small problems; it doesn't replace a teammate who knows the system.
Who it’s for: Development teams, solo developers without a reviewer, and open-source maintainers handling many contributions.
Why low risk: AI review comments can be noisy, miss design problems, or confidently flag correct code.
ChatGPT has the highest score on our published rubric (94/100) of the 4 tools listed for this task. Codex includes PR review; Free has limited Codex access.
Step by step
- Turn on AI review for one repository first and agree what it's for (bugs, security smells, tests).
- Write short review guidelines the tool can follow, if it supports them.
- Read AI comments as suggestions: accept, reply or dismiss each one.
- Keep a human approval rule for merging.
- After a few weeks, check which comments were useful and adjust the guidelines.
AI prompts to review a pull request
Replace the [brackets] with your details. See all prompt examples
Review this pull request diff. Focus on bugs, security issues and missing tests. For each comment give the file and line, why it matters and a suggested fix. Skip style nits. [diff]
Draft review guidelines for an AI reviewer on our [language/framework] repository: what to flag, what to ignore, severity levels. Keep it under 200 words.
Summarise this pull request for a human reviewer: what changed, risky areas, and the 3 files to read first.
Illustrative example
You paste
Diff adds a new endpoint that reads a user ID from the query string.
A good answer looks like
AI comment: "routes/orders.py line 42: user_id comes from the request without checking it matches the logged-in user, so any user could read another's orders. Suggest: compare with the session user and return 403."
Illustrative example written for this guide, not output captured from a specific tool.
Which tool to pick, and why
- GitHub Copilot: Pro adds code review on pull requests ($10/month, verified); Free includes limited chat and agent usage in your editor. Free plan can do this Visit official website ↗
- Cursor: Premium includes Bugbot code review; its agent can search the codebase for callers of a risky function. Free plan can do this Visit official website ↗
- ChatGPT (incl. Work & Codex): Codex includes PR review; Free has limited Codex access. Free plan can do this Visit official website ↗
- Claude (incl. Claude Code): Claude Code includes code review and can read the whole repository; the Free plan handles pasted snippets. Visit official website ↗
Reasons come from the capabilities, free-plan details and prices we've checked on official pages (separate from any dated trial above). Sources: github.com/features/copilot/plans · cursor.com/pricing · chatgpt.com/pricing · claude.com/pricing
Common mistakes
- Treating AI approval as a human approval.
- Leaving noisy style comments on, so people stop reading them.
- Not telling it your team's conventions.
- Enabling it on private repositories without checking data settings.
Privacy tip
Check the tool's training and retention settings for private code, and whether your organisation's plan excludes it from training.
GitHub Copilot setting · Cursor setting · ChatGPT (incl. Work & Codex) setting · Sources: github.com/features/copilot/plans · cursor.com/help/security-and-privacy/privacy · help.openai.com/en/articles/7730893-data-controls-in-chatgpt