workflows.fit
Back to n8n workflows
n8n templateFreeBy Evgeny Agronsky

Automate code reviews for GitLab MRs with Gemini AI and JIRA context

What it does Automates code review by listening for a comment trigger on GitLab merge requests, summarising the diff, and using an LLM to post constructive, line‑specific feedback. If a JIRA ticket ID is found in the ...

DevelopmentCore NodesProductivityAILangchainIfChain LlmLm Chat Google Gemini
Loading interactive preview...

Template notes

What it does

Automates code review by listening for a comment trigger on GitLab merge requests, summarising the diff, and using an LLM to post constructive, line‑specific feedback. If a JIRA ticket ID is found in the MR description, the ticket’s summary is used to inform the AI review.

Use cases

- Quickly obtain high‑quality feedback on MRs without waiting for peers. - Highlight logic, security or performance issues that might slip through cursory reviews. - Incorporate project context by pulling in related JIRA ticket summaries.

Good to know

- Triggered by commenting ai-review on a merge request. - The LLM returns only high‑value findings; if nothing critical is detected, the workflow posts an “all clear” message. - You can swap out the LLM (Gemini, OpenAI, etc.) or adjust the prompt to fit your team’s guidelines. - AI usage may incur costs or be geo‑restricted depending on your provider n8n.io.

How it works - Webhook listener: A Webhook node captures GitLab note events and filters for the trigger phrase.

- Fetch & parse: The workflow retrieves MR details and diffs, splitting each change into “original” and “new” code blocks.