The GitLab Docs website is now available in Japanese!

Code Review Flow

  • Tier: Premium, Ultimate
  • Add-on: GitLab Duo Core or Pro
  • Offering: GitLab.com, GitLab Self-Managed

Depending on your add-on, you might have access to GitLab Duo Code Review (Classic) instead. Learn how Code Review Flow is different.

The Code Review Flow helps you streamline code reviews with agentic AI.

This flow:

  • Analyzes code changes, merge request comments, and linked issues.
  • Provides enhanced contextual understanding of repository structure and cross-file dependencies.
  • Delivers detailed review comments with actionable feedback.
  • Supports custom review instructions tailored to your project.

This flow is available in the GitLab UI only.

Use the flow

Prerequisites:

To trigger a Code Review Flow on a merge request:

  1. On the left sidebar, select Code > Merge requests and find your merge request.
  2. Use one of these methods to trigger the review:
    • Assign GitLab Duo as a reviewer.
    • In a comment box, enter the quick action /assign_reviewer @GitLabDuo.

You can interact with GitLab Duo by:

  • Replying to its review comments to ask for clarification or alternative approaches.
  • Mentioning @GitLabDuo in any discussion thread to ask follow-up questions.

Automatic code reviews

You can configure automatic code reviews for projects or groups to ensure all merge requests receive an initial review by GitLab Duo.

Learn how to enable automatic reviews for a project.

Learn how to enable automatic reviews for groups and applications.

Custom code review instructions

Customize the behavior of Code Review Flow with repository-specific review instructions. You can guide GitLab Duo to:

  • Focus on specific code quality aspects (such as security, performance, and maintainability).
  • Enforce coding standards and best practices unique to your project.
  • Target specific file patterns with tailored review criteria.
  • Provide more detailed explanations for certain types of changes.

To configure custom instructions, see customize instructions for GitLab Duo.

Differences from GitLab Duo Code Review (Classic)

While the Code Review Flow provides the same core functionality as GitLab Duo Code Review (Classic), the GitLab Duo Agent Platform implementation offers:

  • Improved context awareness: Better understanding of repository structure and cross-file dependencies.
  • Agentic capabilities: Multi-step reasoning for more thorough analysis.
  • Modern architecture: Built on the scalable GitLab Duo Agent Platform.

All existing features including custom instructions, automatic reviews, and interaction patterns remain compatible.