GitLab Duo in merge requests
DETAILS: Tier: Ultimate with GitLab Duo Enterprise - Start a trial Offering: GitLab.com
GitLab Duo is designed to provide contextually relevant information during the lifecycle of a merge request.
Generate a description by summarizing code changes
DETAILS: Status: Beta
- Introduced in GitLab 16.2 as an experiment.
- Changed to beta in GitLab 16.10.
- Changed to require GitLab Duo add-on in GitLab 17.6 and later.
When you create or edit a merge request, use GitLab Duo Merge Request Summary to create a merge request description.
-
In the Description field, put your cursor where you want to insert the description.
-
Above the description, select Summarize code changes.
The description is inserted where your cursor was.
Provide feedback on this feature in issue 443236.
Data usage: The diff of changes between the source branch's head and the target branch is sent to the large language model.
Have GitLab Duo review your code
DETAILS: Status: Experiment
- Introduced in GitLab 17.5 as an experiment.
- Feature flag
ai_review_merge_request
disabled by default.
FLAG: The availability of this feature is controlled by a feature flag. For more information, see the history.
WARNING: This feature is considered experimental and is not intended for customer usage outside of initial design partners. We expect major changes to this feature.
DISCLAIMER: This page contains information related to upcoming products, features, and functionality. It is important to note that the information presented is for informational purposes only. Please do not rely on this information for purchasing or planning purposes. The development, release, and timing of any products, features, or functionality may be subject to change or delay and remain at the sole discretion of GitLab Inc.
When your merge request is ready to be reviewed, use GitLab Duo Code Review to perform an initial review.
- On the left sidebar, select Search or go to and find your project.
- Select Code > Merge requests and find your merge request.
- In a comment box enter the quick action
/duo_code_review
.
Data usage: When you use this feature, the following data is sent to the large language model referenced above:
- Contents of the file
- The filename
Summarize a code review
DETAILS: Status: Experiment
- Introduced in GitLab 16.0 as an experiment.
When you've completed your review of a merge request and are ready to submit your review, use GitLab Duo Code Review Summary to generate a summary of your comments.
- On the left sidebar, select Search or go to and find your project.
- Select Code > Merge requests and find the merge request you want to review.
- When you are ready to submit your review, select Finish review.
- Select Summarize my pending comments.
The summary is displayed in the comment box. You can edit and refine the summary prior to submitting your review.
Provide feedback on this experimental feature in issue 408991.
Data usage: When you use this feature, the following data is sent to the large language model referenced above:
- Draft comment's text
Generate a merge commit message
DETAILS: Offering: GitLab.com, Self-managed, GitLab Dedicated
- Introduced in GitLab 16.2 as an experiment with a flag named
generate_commit_message_flag
. Disabled by default.- Feature flag
generate_commit_message_flag
enabled by default in GitLab 17.2.
FLAG: The availability of this feature is controlled by a feature flag. For more information, see the history.
When preparing to merge your merge request, edit the proposed merge commit message by using GitLab Duo Merge Commit Message Generation.
- On the left sidebar, select Search or go to and find your project.
- Select Code > Merge requests and find your merge request.
- Select the Edit commit message checkbox on the merge widget.
- Select Generate commit message.
- Review the commit message provide and choose Insert to add it to the commit.
Data usage: When you use this feature, the following data is sent to the large language model referenced above:
- Contents of the file
- The filename