debian-mirror-gitlab/doc/user/admin_area/merge_requests_approvals.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1.9 KiB
Markdown
Raw Normal View History

2020-03-13 15:44:24 +05:30
---
2020-06-23 00:09:42 +05:30
stage: Create
group: Source Code
2021-02-22 17:27:13 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-03-13 15:44:24 +05:30
type: reference, concepts
---
2021-12-11 22:18:48 +05:30
# Merge request approvals **(PREMIUM SELF)**
2020-03-13 15:44:24 +05:30
2021-12-11 22:18:48 +05:30
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/39060) in GitLab 12.8.
2020-03-13 15:44:24 +05:30
2021-12-11 22:18:48 +05:30
Merge request approval rules prevent users from overriding certain settings on the project level.
When enabled at the instance level, these settings [cascade](../project/merge_requests/approvals/settings.md#settings-cascading)
and can no longer be changed:
2020-03-13 15:44:24 +05:30
2021-12-11 22:18:48 +05:30
- In projects.
- In groups. Cascading to groups was [enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/285410)
in GitLab 14.5.
To enable merge request approval settings for an instance:
2020-03-13 15:44:24 +05:30
2021-11-11 11:23:49 +05:30
1. On the top bar, select **Menu > Admin**.
2021-12-11 22:18:48 +05:30
1. On the left sidebar, select **{push-rules}** **Push Rules**, and expand **Merge request approvals**.
1. Choose the required options.
2022-07-23 23:45:48 +05:30
1. Select **Save changes**.
2020-03-13 15:44:24 +05:30
## Available rules
2021-12-11 22:18:48 +05:30
Merge request approval settings that can be set at an instance level are:
2020-03-13 15:44:24 +05:30
2021-12-11 22:18:48 +05:30
- **Prevent approval by author**. Prevents project maintainers from allowing request authors to
merge their own merge requests.
- **Prevent approvals by users who add commits**. Prevents project maintainers from allowing users
to approve merge requests if they have submitted any commits to the source branch.
- **Prevent editing approval rules in projects and merge requests**. Prevents users from modifying
the approvers list in project settings or in individual merge requests.
2021-04-29 21:17:54 +05:30
2021-11-18 22:05:49 +05:30
See also the following, which are affected by instance-level rules:
2021-12-11 22:18:48 +05:30
- [Project merge request approval rules](../project/merge_requests/approvals/index.md).
2022-07-23 23:45:48 +05:30
- [Group merge request approval settings](../group/index.md#group-merge-request-approval-settings) available in GitLab 13.9 and later.