Skip to content

Merge request approval settings

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

You can configure the settings for merge request approvals to ensure the approval rules meet your use case. You can also configure approval rules, which define the number and type of users who must approve work before it's merged. Merge request approval settings define how to apply those rules as a merge request moves toward completion.

Use any combination of these settings to configure approval limits for merge requests:

Edit merge request approval settings

To view or edit merge request approval settings for a single project:

  1. On the left sidebar, select Search or go to and find your project.
  2. Select Settings > Merge requests.
  3. Expand Approvals.

Cascade settings from the instance or top-level group

To simplify the management of approval rule settings, configure the approval rules at the broadest possible level. Rules created:

If a group or project inherits settings, you can't change them in the inheriting group or project. You must change the settings where they originated: the top-level group or instance.

Prevent approval by author

By default, the author of a merge request cannot approve it. To change this setting:

  1. On the left sidebar, select Search or go to and find your project.
  2. Select Settings > Merge requests.
  3. In the Merge request approvals section, scroll to Approval settings and clear the Prevent approval by author checkbox.
  4. Select Save changes.

Authors can edit the approval rule in an individual merge request and override this setting, unless you configure one of these options:

Prevent approvals by users who add commits

By default, users who commit to a merge request can still approve it. At both the project level or instance level, you can prevent committers from approving merge requests that are partially their own. To do this:

  1. On the left sidebar, select Search or go to and find your project.
  2. Select Settings > Merge requests.
  3. In the Merge request approvals section, scroll to Approval settings and select Prevent approvals by users who add commits. If this checkbox is cleared, an administrator has disabled it at the instance level, and you can't change it at the project level.
  4. Select Save changes.

Code owners who commit to a merge request cannot approve it, if the merge request affects files they own.

For more information, see the official Git documentation.

Prevent editing approval rules in merge requests

By default, users can override the approval rules you create for a project on a per-merge-request basis. If you don't want users to change approval rules on merge requests, you can disable this setting:

  1. On the left sidebar, select Search or go to and find your project.
  2. Select Settings > Merge requests.
  3. In the Merge request approvals section, scroll to Approval settings and select Prevent editing approval rules in merge requests.
  4. Select Save changes.

This change affects all open merge requests.

When you change this field, it can affect all open merge requests depending on the setting:

  • If users could edit approval rules previously, and you disable this behavior, GitLab updates all open merge requests to enforce the approval rules.
  • If users could not edit approval rules previously, and you enable approval rule editing, open merge requests remain unchanged. This preserves any changes already made to approval rules in those merge requests.

Require user re-authentication to approve

  • Requiring re-authentication by using SAML authentication for GitLab.com groups introduced in GitLab 16.6 with a flag named ff_require_saml_auth_to_approve. Disabled by default.
  • Requiring re-authentication by using SAML authentication for self-managed instances introduced in GitLab 16.7 with a flag named ff_require_saml_auth_to_approve. Disabled by default.
  • Enabled ff_require_saml_auth_to_approve by default in GitLab 16.8 for GitLab.com and self-managed instances.

FLAG: On self-managed GitLab, by default requiring re-authentication by using SAML authentication is available. To hide the feature, an administrator can disable the feature flag named ff_require_saml_auth_to_approve. On GitLab.com and GitLab Dedicated, this feature is available.

You can force potential approvers to first authenticate with SAML or a password. This permission enables an electronic signature for approvals, such as the one defined by Code of Federal Regulations (CFR) Part 11.

Prerequisites:

  • This setting is only available on top-level groups.
  1. On the left sidebar, select Search or go to and find your project.
  2. Enable password authentication and SAML authentication. For more information on:
  3. On the left sidebar, select Settings > Merge requests.
  4. In the Merge request approvals section, scroll to Approval settings and select Require user re-authentication (password or SAML) to approve.
  5. Select Save changes.

Remove all approvals when commits are added to the source branch

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

By default, an approval on a merge request is removed when you add more changes after the approval. In GitLab Premium and Ultimate tiers, to keep existing approvals after more changes are added to the merge request:

  1. On the left sidebar, select Search or go to and find your project.
  2. Select Settings > Merge requests.
  3. In the Merge request approvals section, scroll to Approval settings and clear the Remove all approvals checkbox.
  4. Select Save changes.

Approvals aren't removed when a merge request is rebased from the UI However, approvals are reset if the target branch changes.

Remove approvals by Code Owners if their files changed

To remove approvals only from Code Owners whose files change in a new commit:

Prerequisites:

  • You must have at least the Maintainer role for a project.

To do this:

  1. On the left sidebar, select Search or go to and find your project.
  2. Select Settings > Merge requests.
  3. In the Merge request approvals section, scroll to Approval settings and select Remove approvals by Code Owners if their files changed.
  4. Select Save changes.

Related topics