- Fill in merge request templates
- Summarize merge request changes
- Summarize my merge request review
- Generate messages for merge or squash commits
- Generate suggested tests in merge requests
GitLab Duo in merge requests
AI-assisted features in merge requests are designed to provide contextually relevant information during the lifecycle of a merge request.
Additional information on enabling these features and maturity can be found in our GitLab Duo overview.
Fill in merge request templates
Introduced in GitLab 16.3 as an Experiment.
This feature is an Experiment on GitLab.com that is using Google’s Vertex service and the text-bison
model. It requires the group-level third-party AI features setting to be enabled.
Merge requests in projects often have templates defined that need to be filled out. This helps reviewers and other users understand the purpose and changes a merge request might propose.
When creating a merge request, GitLab Duo can generate a description for the merge request based on the contents of the template. This fills in the template and replaces the current contents of the description.
To generate the description:
- Create a new merge request, go to the Description field.
- Select AI Actions ().
- Select Fill in merge request template.
The updated description is applied to the box. You can edit or revise this description before you finish creating your merge request.
Provide feedback on this experimental feature in issue 416537.
Data usage: When you use this feature, the following data is sent to the large language model referenced above:
- Title of the merge request
- Contents of the description
- Diff of changes between the source branch’s head and the target branch
Summarize merge request changes
Introduced in GitLab 16.2 as an Experiment.
This feature is an Experiment on GitLab.com that is using Google’s Vertex service and the text-bison
model. It requires the group-level third-party AI features setting to be enabled.
GitLab Duo Merge request summaries are available on the merge request page in:
- The Merge request summaries dialog.
- The To-Do list.
- Email notifications.
Provide feedback on this experimental feature in issue 408726.
Data usage: The diff of changes between the source branch’s head and the target branch is sent to the large language model.
Summarize my merge request review
Introduced in GitLab 16.0 as an Experiment.
This feature is an Experiment on GitLab.com that is using Google’s Vertex service and the text-bison
model. It requires the group-level third-party AI features setting to be enabled.
When you’ve completed your review of a merge request and are ready to submit your review, generate a GitLab Duo Code review summary:
- When you are ready to submit your review, select Finish review.
- Select AI Actions ().
- Select Summarize my code review.
The summary is displayed in the comment box. You can edit and refine the summary prior to submitting your review.
Merge request review summaries are also automatically generated when you submit your review. These automatically generated summaries are available on the merge request page in the Merge request summaries dialog, the To-Do list, and in email notifications.
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 messages for merge or squash commits
Introduced in GitLab 16.2 as an Experiment.
This feature is an Experiment on GitLab.com that is using Google’s Vertex service and the text-bison
model. It requires the group-level third-party AI features setting to be enabled.
When preparing to merge your merge request you may wish to edit the proposed squash or merge commit message.
To generate a commit message with GitLab Duo:
- Select the Edit commit message checkbox on the merge widget.
- Select Create AI-generated commit message.
- Review the commit message provide and choose Insert to add it to the commit.
Provide feedback on this experimental feature in issue 408994.
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
Generate suggested tests in merge requests
Introduced in GitLab 16.0 as an Experiment.
This feature is an Experiment on GitLab.com that is using Google’s Vertex service and the code-bison
model. It requires the group-level third-party AI features setting to be enabled.
Use GitLab Duo Test generation in a merge request to see a list of suggested tests for the file you are reviewing. This functionality can help determine if appropriate test coverage has been provided, or if you need more coverage for your project.
View a click-through demo.
To generate a test suggestion:
- In a merge request, select the Changes tab.
- On the header for the file, in the upper-right corner, select Options ().
- Select Suggest test cases.
The test suggestion is generated in a sidebar. You can copy the suggestion to your editor and use it as the start of your tests.
Feedback on this experimental feature can be provided in issue 408995.
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