Skip to content
Developer & DevOps

Automated code review for GitLab merge requests with ChatGPT

10 nodes 600 221 Webhook
Download

Loading workflow…

Workflow Description

Automation that intercepts GitLab merge requests via webhook, sends the code changes to ChatGPT for analysis, and posts detailed review comments back to the repository, enabling developers to catch issues before merging.

How it works

  1. 1.Receive webhook notification when a merge request is created
  2. 2.Extract and retrieve the diff code from the GitLab branch
  3. 3.Send code to ChatGPT for comprehensive review and analysis
  4. 4.Process the AI response and structure feedback
  5. 5.Post review comments back to GitLab merge request

Use cases

  • Enforce code quality standards before code is merged
  • Reduce manual code review time and developer overhead
  • Identify common bugs, security issues, and anti-patterns automatically

Requirements

  • Active GitLab webhook configured for merge request events
  • Valid OpenAI API key with GPT access
  • Write permissions on GitLab repository

Service Value

Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.

Apps Used

Webhook Code Split Out OpenAI HTTP Request If LLM Chain

Details

Trigger Webhook
Nodes 10
Apps 7
Views 600
Downloads 221

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (10)

/

Sticky Note

Sticky Note

#1

Sticky Note2

Sticky Note

#2

Sticky Note3

Sticky Note

#3

Webhook

Webhook

#4

Code

Code

#5

Split Out1

Split Out

#6

OpenAI Chat Model1

OpenAI

#7

Get Changes1

HTTP Request

#8

Skip File Change1

If

#9

Parse Last Diff Line1

Code

#10

Post Discussions1

HTTP Request

#11

Need Review1

If

#12

Basic LLM Chain1

LLM Chain

#13

Sticky Note4

Sticky Note

#14
Stay in the loop

Fresh workflows, straight to your inbox

Get newly published DROPIDEA workflows, a clear overview of what they do, and a link to explore them.

  • New workflows
  • Clear overviews
  • Setup guides

Be first to discover what is new

Your name, your email, and one confirmation.

Email confirmation · Unsubscribe anytime