Templates / ChatGPT Automatic Code Review in Gitlab MR

ChatGPT Automatic Code Review in Gitlab MR

Ready for 3.0

by assert · 33,546 views · created 2024-03-07 · Engineering, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 10 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects OpenAI Chat Model.

How it runs

Trigger: When an HTTP POST request hits its webhook URL.

  1. Need Review (If): checks a condition and branches into true / false
  2. Get Changes (HTTP Request): calls an HTTP API
  3. Split Out: splits a list into separate items
  4. Skip File Changes (If): checks a condition and branches into true / false
  5. Parse Last Diff Line (Code): runs custom JavaScript code
  6. Code: runs custom JavaScript code
  7. Basic LLM Chain: sends a prompt to an LLM, with model: OpenAI Chat Model
  8. Post Discussions (HTTP Request): calls an HTTP API (POST)

Services it uses

OpenAI Chat Model

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (7)

From the author

Who this template is for This template is for every engineer who wants to automate their code reviews or just get a 2nd opinion on their PR. How it works This workflow will automatically review your changes in a Gitlab PR using the power of AI. It will…

Excerpt from assert's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.