Skip to content

GitLab Duo in merge requests

DETAILS: Tier: Ultimate 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: Tier: For a limited time, Ultimate. In the future, GitLab Duo Enterprise. Offering: GitLab.com Status: Beta

Use GitLab Duo Merge request summary to create a merge request description when you create or edit a merge request.

  1. Create a new merge request.

  2. In the Description field, put your cursor where you want to insert the description.

  3. Above the description, select Summarize code changes.

    merge_request_ai_summary_v16_11

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.

Generate a description from a template

DETAILS: Tier: For a limited time, Ultimate. In the future, GitLab Duo Enterprise. Offering: GitLab.com Status: Beta

Many projects include templates that you populate when you create a merge request. These templates help populate the description of the merge request. They can help the team conform to standards, and help reviewers and others understand the purpose and changes proposed in the merge request.

When you create a merge request, GitLab Duo Merge request template population can generate a description for your merge request, based on the contents of the template. GitLab Duo fills in the template and replaces the contents of the description.

To use GitLab Duo to generate a merge request description:

  1. Create a new merge request and go to the Description field.
  2. Select GitLab Duo ({tanuki-ai}).
  3. Select Fill in merge request template.

The updated description is applied. You can edit or revise the 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 a code review

DETAILS: Tier: For a limited time, Ultimate. In the future, GitLab Duo Enterprise. Offering: GitLab.com Status: Experiment

When you've completed your review of a merge request and are ready to submit your review, generate a GitLab Duo Code review summary:

  1. On the left sidebar, select Search or go to and find your project.
  2. Select Code > Merge requests and find the merge request you want to review.
  3. When you are ready to submit your review, select Finish review.
  4. 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: Tier: Premium and Ultimate with GitLab Duo Enterprise. Offering: GitLab.com, Self-managed, GitLab Dedicated

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 you might wish to edit the proposed merge commit message.

To generate a commit message with GitLab Duo:

  1. On the left sidebar, select Search or go to and find your project.
  2. Select Code > Merge requests and find your merge request.
  3. Select the Edit commit message checkbox on the merge widget.
  4. Select Generate commit message.
  5. 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

Related topics