Developer & DevOps
Automated code review for GitLab merge requests with ChatGPT
14 nodes
290
185
Webhook
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.Receive webhook notification when a merge request is created
- 2.Extract and retrieve the diff code from the GitLab branch
- 3.Send code to ChatGPT for comprehensive review and analysis
- 4.Process the AI response and structure feedback
- 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
OpenAI
LLM Chain
Details
Trigger
Webhook
Nodes
14
Apps
2
Views
290
Downloads
185
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (14)
/
Sticky Note
Sticky Note
Sticky Note2
Sticky Note
Sticky Note3
Sticky Note
Webhook
Webhook
Code
Code
Split Out1
Split Out
OpenAI Chat Model1
OpenAI
Get Changes1
HTTP Request
Skip File Change1
If
Parse Last Diff Line1
Code
Post Discussions1
HTTP Request
Need Review1
If
Basic LLM Chain1
LLM Chain
Sticky Note4
Sticky Note