Review GitHub pull requests automatically
An n8n AI agent triggers on each new PR, fetches diffs, calls an LLM for a review, and posts comments and labels back on the PR.
Done withn8n
- What they did
- A GitHub Trigger node in n8n fires when a PR is opened. An HTTP Request node calls GitHub's pull request files API, and a Code node merges each filename and diff into a prompt that casts the model as a senior iOS developer. The agent runs on an OpenAI chat model and reads a Google Sheet of team Swift best practices as a tool. GitHub nodes then post the comment and add a ReviewedByAI label.
- How it went
- In a test PR adding iota cryptocurrency support, the agent posted a comment and applied the label. The comment was one general comment, not line-level. Reviews were often too verbose and could miss the core problems.
- Worth knowing
- Validate each node's output as you build it. Inline comments would need a loop over each file's diff and line numbers, which the author lists as a next step and did not build.
Try it yourself with n8n
Build an n8n workflow triggered when a new pull request opens in my GitHub repo [owner/repo]. It should fetch the diff, ask an AI model to review it for bugs, readability and missing tests, then post the review as a comment and add a label such as [label names]. You're done when a test PR gets a useful review comment; pause and show me the comment and label before anything is posted to GitHub.
Want help getting this working? Join the Vibe Coding Academy ↗ Run by Alex Finn, who also runs this site.
2 more accounts of this
Source: medium.com · Undated
Related use cases
Add todo items to Todoist from Telegram
A Telegram bot with an LLM and an orchestration platform (n8n or windmill) adds todos to the author's Todoist account from natural language messages.
Turn any URL into a structured Notion note
An n8n workflow fetches a submitted URL, strips it to readable content, has OpenAI summarise it into structured fields, and saves a Notion note.
Send travel checklists and welcome-back messages
An n8n workflow scans a travel agency's daily trip sheet and sends WhatsApp checklists 3 days before departure and welcome-back messages a day after return.
Build a C compiler with a team of parallel agents
Anthropic's engineering write-up on tasking Opus 4.6 agent teams with building a C compiler.
Audit a feature's issues and hand them to an engineer's agent
An AI agent listed all issues with a feature and sent them to an engineer, whose own agent then addressed most of them automatically.
Custom agent
Cross-check coding agent answers with a second agent
The poster built a tool that automatically sends Claude Code responses to Codex for a second opinion, replacing manual copy-pasting.
Get 5 like this every morning
The best things people got an AI agent to do, each with the prompt to try it.