Skip to content

Add new jsonb column to store settings for default branch protection

Michael Becker requested to merge feat/408150 into master

What does this MR do and why?

Currently, the options for default branch protection at the instance and group level lag behind, and are not as fine-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 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

To offer better support of protected branches features on the default branch, we can:

  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

This commit performs step 1, by adding a new jsonb column

resolves: #408150 (closed) Changelog: added

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

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

Edited by Michael Becker

Merge request reports

Loading