Skip to content

Add logic to Projects::AllBranchesRule::MergeRequestApprovalSetting to load approval_removals

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

In Create Projects::BranchRules::MergeRequestAppro... (#504615 - closed) we created a model to store the merge request approval settings for a branch rule

As part of that change we are merging the approval removals logic so we have 1 enum instead of 2 different columns. The project settings is currently a radio select where you can chose either

  1. keep all
  2. remove all
  3. remove the code owner approvals when code owner files change

image

Keep all doesn't have a specific column Remove all is stored in the projects table Remove code owner approvals is stored in the project_settings table

We need to mimic an enum value so ideally we would create the boolean methods as well as the approval_removals method i.e. approval_removals_none? approval_removals_all? approval_removals_code_owner?

Edited by 🤖 GitLab Bot 🤖