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.
2 more accounts of this
Source: medium.com · Undated
Five of these in your inbox every morning
The best things people got an AI agent to do, each with the prompt to try it.
More like this
Draft email replies and LinkedIn posts with n8n workflows
The author built n8n workflows that draft Gmail replies for approval, generate LinkedIn posts from a topic, and extract tasks from emails into Google Tasks or Notion.
Handle routine email tasks and follow-up reminders with a personal assistant
Author built an n8n personal assistant that handles about 70% of routine email tasks and sends reminders for tasks waiting on others, after fixing early quirks.
Generate deep research reports into Notion
An n8n workflow turns a topic into up to three Tavily searches, compiles a Markdown report with an agent, and pushes it to a Notion page.
- Claude
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.
Write and debug code across eight test tasks
A reviewer had Manus build a currency converter, fix a find_max bug and make a landing page, with mostly strong results.
Build and deploy an app over a weekend
The author had Devin build and deploy an app, finding it quick on PR feedback but weak on legacy monorepos and costly on broad requests.