Skip to content

Move default branch protection to repository settings

What does this MR do and why?

This merge request moves admin and group-level default branch protection to repository settings to resolve #340403 (closed). The following changes are made:

  • Merges default branch protection and default initial branch together under repository.
  • Updates the admin & group settings section header and description.
  • Updates form labels.
  • Add help text to Allow owners checkbox.
  • Updates the branch protection settings documentation.

Screenshots or screen recordings

Note: The designs are slightly outdated as the dropdowns have been converted to radio buttons in !72721 (merged).

Admin > Settings > General

Removed default branch protection section.

Click to expand
Before After
image image

Admin > Settings > Repository

Added and updated default branch protection section.

Click to expand
Before After Design
image image image

Group > Settings > General

Removed default branch protection section.

Click to expand
Before After
image image

Group > Settings > Repository

Added and updated default branch protection section.

Click to expand
Before After Design
image image image

How to set up and validate locally

  1. You need at least a GitLab Premium license.
  2. Checkout this branch 340403-migrate-default-branch-protection-to-repository-settings.
  3. View the admin settings at [GDK_HOST]/admin/application_settings/repository.
  4. Edit and save the branch protection and reload the page to make sure that it saved.
  5. View the group settings at [GDK_HOST]/groups/gitlab-org/-/settings/repository.
  6. Edit and save the group branch protection & allow owners and reload the page to make sure that it saved.
  7. Checkout master branch and make sure that the same branch protection settings are saved at the current location for:
    • Admin-level [GDK_HOST]/admin/application_settings/general
    • Group-level [GDK_HOST]/groups/gitlab-org/-/edit

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #340403 (closed)

Edited by Jiaan Louw

Merge request reports