GitLab Duo in merge requests
- 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
- Status: Beta
- LLM: Vertex AI Codey
text-bison
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.
On the toolbar above the text area, 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
- Status: Experiment
- LLM: Anthropic Claude 3.5 Sonnet
The availability of this feature is controlled by two feature flags. For more information, see the history.
This feature is considered experimental and breaking changes may still be made to this feature.
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
/assign_reviewer @GitLabDuo
, or assign GitLab Duo as reviewer.
Provide feedback on this feature in issue 517386.
Data usage: When you use this feature, the following data is sent to the large language model:
- Contents of the file
- The filename
Interact with GitLab Duo in reviews
You can mention @GitLabDuo
in comments to interact with GitLab Duo on your merge request. You can ask follow-up questions on its review comments, or ask questions on any discussion thread in your merge request.
Interactions with GitLab Duo can help to improve the suggestions and feedback as you work to improve your merge request.
Summarize a code review
- Status: Experiment
- LLM: Vertex AI Codey
text-bison
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 Add Summary.
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
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
- LLM: Anthropic Claude 3.5 Sonnet
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 provided 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:
- Contents of the file
- The filename
Related topics
Docs
Edit this page to fix an error or add an improvement in a merge request.
Create an issue to suggest an improvement to this page.
Product
Create an issue if there's something you don't like about this feature.
Propose functionality by submitting a feature request.
Feature availability and product trials
View pricing to see all GitLab tiers and features, or to upgrade.
Try GitLab for free with access to all features for 30 days.
Get help
If you didn't find what you were looking for, search the docs.
If you want help with something specific and could use community support, post on the GitLab forum.
For problems setting up or using this feature (depending on your GitLab subscription).
Request support