Skip to content

[default branch protection] deprecate `default_branch_protection`

Background Context

Currently, the options for default branch protection at the instance and group level lag behind, and are not as fin grained, as the options available from the Protected Branches feature

The branch defaults lag behind because the current implementation uses an integer column to store the default settings, which becomes difficult if not impossible to expand as new options and finer detail controls are added to the protected branches feature

at a high-ish level the existing feature is implemented as:

  1. there are integer columns on the database tables (application level and group level)
  2. these integers are mapped to a subset of protected branch settings
  3. when creating a default branch, those settings are passed into the protected branch service

Proposal

A more detailed proposal can be seen in the epic [here](&10391

At a high level the proposal is to:

  1. use a jsonb column rather than an integer
  2. update the settings API to accept a payload the matches the protected branches API
  3. Pass those settings into the ProtecteBrancheService here

This issue

This issue is specifically for tracking the progress of deprecating the the existing branch protection api

Edited by Michael Becker