Merge request approvals

Tier: Free, Premium, Ultimate Offering: GitLab.com, Self-managed, GitLab Dedicated

To set up a review process for changes in your project, configure merge request approvals. They help to ensure that changes are reviewed before they’re merged into your project. You can configure approvals to be optional or required, depending on your project’s needs and GitLab tier.

Configure approval rules

Prerequisites:

  • You must have at least the Developer role for the project.

To configure approval rules:

  1. Go to your project’s Settings > Merge requests.
  2. Go to the Merge request approvals section.
  3. Set up your desired rules.

You can also configure:

For more information on configuring rules, see Approval rules.

Required approvals

Tier: Premium, Ultimate Offering: GitLab.com, Self-managed, GitLab Dedicated

Required approvals enforce code reviews by specified users. Without these approvals, merging is not possible.

Use cases include:

  • Enforce review of all code that gets merged into a repository.
  • Specify reviewers and a minimum number of approvals.
  • Specify categories of reviewers, such as backend, frontend, quality assurance, database, or documentation.
  • Use the Code Owners files to determine reviewers.
  • Require approval for declining test coverage.
  • GitLab Ultimate: Require security team approval for potential vulnerabilities.

View approval status

You can see the approval status of a merge request in two places. On the merge request itself and in the list of merge requests for your project or group.

For a single merge request

Eligible approvers can view the approval status on a single merge request.

To view the approval status:

  1. On the left sidebar, select Search or go to and find your project.
  2. Go to Code > Merge requests and find your merge request.
  3. To view the merge request, select its title.
  4. Go to the merge request widget to see the approval status. In this example, you can approve the merge request:

    Merge request widget showing approval status

The widget displays one of these statuses:

  • Approve: The merge request needs more approvals.
  • Approve additionally: The merge request has the required approvals.
  • Revoke approval: You have already approved the merge request.

To check if your approval satisfies Code Owner requirements, select Expand eligible approvers ().

In the list of merge requests

The list of merge requests for your project or group shows the approval status for each merge request:

Example Description
Approvals not yet satisfied Required approvals are missing. ()
Approvals are satisfied Approvals are satisfied. ()
Approvals are satisfied, and you approved Approvals are satisfied, and you are one of the approvers. ()

Individual reviewer status

To see the review and approval status for each reviewer:

  1. Open the merge request.
  2. Check the right sidebar.

Each reviewer’s status is shown next to the their name.

  • Awaiting review
  • Review in progress
  • Approved
  • Reviewer commented
  • Reviewer requested changes

    This reviewer has requested changes, and blocked this merge request.

To re-request a review, select the Re-request a review icon () next to the user.

Approve a merge request

Eligible approvers can approve merge requests in two ways:

  1. Select Approve in the merge request widget.
  2. Use the /approve quick action in a comment.

Approved merge requests display a green check mark () next to the user’s name in the reviewer list. After a merge request receives the required approvals, it is ready to merge, unless it’s blocked due to:

Prevent author approval

To prevent merge request authors from approving their own work, enable the Prevent approval by author setting.

Approval rule changes

If you enable approval rule overrides, changes to default approval rules don’t affect existing merge requests, except for target branch changes.

Invalid rules

History

GitLab marks approval rules as Auto approved when they’re impossible to satisfy, such as when:

  • The only eligible approver is the merge request author.
  • No eligible approvers are assigned to the rule.
  • The required approvals exceed the number of eligible approvers.

These rules are automatically approved to unblock merge requests, unless you created rules through a merge request approval policy.

Invalid policy-created rules:

  • Display as Action required.
  • Are not automatically approved.
  • Block affected merge requests.