Skip to content

Add MR settings support for group (EE backend)

This MR completes this issue and this epic at the same time: #372040 (closed) & &8704 (closed)

There are 3 settings that project maintainers can use to control when merges happen:

  • only_allow_merge_if_pipeline_succeeds
  • allow_merge_on_skipped_pipeline
  • only_allow_merge_if_all_discussions_are_resolved

Regulated customers want the ability to control these options at the group level setting (only accessible by Group Owners), that cannot be overridden by the project level setting.

In order to facilitate the code review, I divided it into these MRs:

Screenshots or screen recordings

No UI changes.

What does this current MR do and why?

  1. Backend - Feature flag, add feature flag support_group_level_merge_checks_setting
  2. Backend - Controller, add Group::Settings::MergeRequestsController to update configuration fields
  3. Backend - NamespaceSetting Model, add [attribute]?(inherit_group_setting) and [attribute]_locked? methods
  4. Backend - Project Model, add [attribute]?(inherit_group_setting) and [attribute]_locked? methods

Final goal of these MRs

Add Merge requests > Merge checks settings support for group level.

How to set up and validate locally

Feature.enable(:support_group_level_merge_checks_setting)

cc @prajnamas

Edited by Zhiyuan Lu

Merge request reports