Skip to content

Merge request approvals

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

You can configure your merge requests to allow (or require) approval before they merge. While GitLab Free allows all users with Developer or greater permissions to approve merge requests, these approvals are optional. GitLab Premium and GitLab Ultimate give you more flexibility:

  • Create required rules about the number and type of approvers before work can merge.
  • Build a list of users who act as code owners for specific files, and require their approval before work can merge.
  • For GitLab Premium and GitLab Ultimate, configure approvals for the entire instance.

You can configure merge request approvals on a per-project basis, and configure some approvals at the group level. Support for group-level settings for merge request approval rules is tracked in epic 4367.

View approval status

You can see the approval status of a merge request both on the merge request itself, and the list of merge requests for your project or group.

For a single merge request

When an eligible approver visits an open merge request, GitLab shows one of these statuses after the body of the merge request. To see it:

  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 title of the merge request to view it.

  4. Scroll to the merge request widget to see the mergeability and approval status for the merge request. In this example, you can approve the merge request:

    You can approve this merge request. It needs approval before it becomes mergeable.

    The text shown in the widget explains its approval status:

    • Approve: The merge request doesn't yet have the required number of approvals.
    • Approve additionally: The merge request has the required number of approvals.
    • Revoke approval: The user viewing the merge request has already approved the merge request.
  5. To see if your approval satisfies the Code Owner requirements, select Expand eligible approvers ({chevron-lg-down}).

To see the individual review and approval status for each reviewer, check the right sidebar of a merge request. Each Reviewer shows the status to the right of the user's name, like this:

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

  • {dash-circle} Awaiting review from this user.
  • {status_running} The user's review is in progress.
  • {check-circle} Approved by this user.
  • {comment-lines} User has requested changes, and blocked this merge request. (If needed, you can bypass this block.)

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

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. ({approval})
Approvals are satisfied Approvals are satisfied. ({check})
Approvals are satisfied, and you approved Approvals are satisfied, and you are one of the approvers. ({approval-solid})

Configuration options for approvals

Use merge request approval rules to set the minimum number of required approvals before work can merge into your project. You can also extend these rules to define what types of users can approve work. Some examples of rules you can create include:

You can also configure:

You can't change the approvals on a merge request after it merges.

Optional approvals

GitLab allows all users with Developer or greater permissions to approve merge requests. Approvals in GitLab Free are optional, and don't prevent a merge request from merging without approval.

Required approvals

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

  • Moved to GitLab Premium in 13.9.

Required approvals enforce code reviews by the number and type of users you specify. Without the approvals, the work cannot merge. Required approvals enable multiple use cases:

Approve a merge request

Eligible approvers can also use the /approve quick action when adding a comment to a merge request. Users in the reviewer list who have approved a merge request display a green check mark ({check-circle-filled}) next to their name.

After a merge request receives the number and type of approvals you configure, it can merge unless it's blocked for another reason. Merge requests can be blocked by other problems, such as merge conflicts, unresolved threads, or a failed CI/CD pipeline.

To prevent merge request authors from approving their own merge requests, enable Prevent author approval in your project's settings.

If you enable approval rule overrides, merge requests created before a change to default approval rules are not affected. The only exceptions are changes to the target branch of the rule.

Invalid rules

When an approval rule is impossible to satisfy, GitLab shows the rule as Auto approved. This happens when:

  • The only eligible approver is also the merge request author.
  • No eligible approvers (either groups or users) are assigned to the approval rule.
  • The number of required approvals is greater than the number of eligible approvers.

These rules are automatically approved to unblock their respective merge requests, unless you created them through a merge request approval policy. Invalid approval rules created through a merge request approval policy are:

  • Shown with Action required.
  • Not automatically approved.
  • Blockers for merge requests they affect.

Related topics