Skip to main content

GitLab approval rules, or a change policy at the merge button

GitLab's protected branches, approval rules and code owners decide who may merge and who must review. Merge Pilot builds on them: one change policy decides which checks a merge request must pass and who must approve the change, opens the change approval in Jira or its built-in tracker, and holds the merge with a GitLab approval rule until the policy is met for the latest commit.

Side by side

The same questions, answered by GitLab's own settings and by a Merge Pilot change policy.

GitLab approval rules compared with Merge Pilot
TopicGitLab approval rules and protected branchesMerge Pilot
Where the merge is heldProtected branches control who may push to a branch and who may merge into it. Approval rules set how many approvals a merge request needs, and from whom, before it can merge (GitLab Premium and Ultimate).An approval rule named "Merge Pilot — <branch>" on each target branch, whose only approver is the connection's bot user. The bot approves the latest commit once the change policy is met and withdraws its approval otherwise; nobody else can meet the rule.Read the docs
Who must approveEach rule names eligible users or groups and a number of approvals, for all protected branches or for one branch. Several rules can apply to one merge request. Without an approval rule, any eligible user can approve.The policy lists ways to approve, for example 1 of Security and 2 of Operations, from the project's approver roles, an approver pool or the code owners of the changed files. The number of approvals can differ by risk level.Read the docs
Code ownersA CODEOWNERS file names the owners of paths. With code owner approval required on a protected branch, a merge request into it needs a code owner's approval for each matched rule (Premium and Ultimate).A "Code owners of the changed files" requirement reads the CODEOWNERS file on the target branch and asks one approval from each set of owners; optional sections need none. Owners are people: groups and roles named in the file are not asked.Read the docs
Which merge requests need whatRules apply by target branch. By default a project's rules can be overridden on a single merge request; the setting "Prevent editing approval rules in merge requests" stops that.Change policies match merge requests by target and source branch, repository, changed paths, size, author, labels and draft state. Standard changes merge once their checks pass, normal changes also need a change approval, and emergency changes may merge first and are reviewed afterwards.Read the docs
Checks from other toolsExternal status checks send merge request data to another service, which reports passed or failed; with "Status checks must succeed" turned on, a failed check keeps the merge request from merging (Ultimate).CI, code review, secret, dependency, license, package health, dependency source, CI configuration, container image, infrastructure and signed commit checks are controls of the same policy, each off, reported or enforced.Read the docs
New commits after an approval"Remove all approvals when commits are added to the source branch" is on by default. A project can instead remove only the approvals of code owners whose files changed, or keep approvals.The bot's approval covers one commit, and the setup can turn on GitLab's removal of approvals when commits are added. A new commit needs its own decision and, by default, a fresh change approval; the policy can instead reopen the same one or keep the approval.Read the docs
Separation of dutiesApproval settings keep the merge request's author from approving it (the default), can keep users who add commits from approving, and can ask approvers to authenticate again with a password or SAML.The author never approves their own change. By default people who committed to it may not approve (a policy can flag them instead), and an approver who merges the change can be flagged. The setup can also turn on GitLab's author, committer and rule-editing settings.Read the docs
Pushes that skip the merge requestUsers allowed to push to a protected branch can push to it directly, which skips merge requests and code owner approval. Force pushes are off by default.Target branches that are not yet protected are protected, by default with no one allowed to push. Pushes that reach a gated branch without an approved merge request, force pushes and deleted branches are reported as violations.Read the docs

When each fits

GitLab's rules on their own

When what you need is peer review of the code by the right people, GitLab does it where developers already work, with no second system: approval rules per branch, code owner approval, and settings for authors, committers and new commits. External status checks bring another service's verdict into the merge request.

A Merge Pilot change policy

When a merge also needs a recorded change approval, when what a change needs depends on more than its target branch (paths, labels, size, risk, the type of change), when security checks belong to the same decision, or when an audit asks which policy version let each merge through.

Read the docs

Both together

They overlap on approvals, code owners and what happens on a new commit. Merge Pilot adds its own approval rule per target branch and leaves your other approval rules in place, so a merge request still needs every rule GitLab requires: a team can keep code owner approval in GitLab and add the change approval through Merge Pilot.

Read the docs

What to consider

Merge Pilot's gate is itself a GitLab approval rule, so repositories under change management need GitLab Premium or Ultimate. Watching repositories, which records what change management would have done without blocking anything, works on any tier.

Read the docs

See it on your own repositories

Ask for a demo on your own GitLab or GitHub repositories.

Sources

What this page says about GitLab comes from GitLab's documentation:

Product details as of November 2026; check the vendor's documentation for changes.

All product names and trademarks belong to their respective owners. Their use here identifies the products and implies no endorsement.