Skip to content

Refactor protection component

What does this MR do and why?

I decided to refactor a bit our protection components before I add another type for toggles.

What has changed:

  • removed protection row for approvals since we're now importing components for it from MR approvals settings module
  • renamed protection to protection_card to better describe what it is
  • adjusting some styling to match the designs better

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

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

Before After
Screenshot_2024-05-15_at_11.05.48 Screenshot_2024-05-15_at_11.00.17
Screenshot_2024-05-15_at_11.06.02 Screenshot_2024-05-15_at_11.00.22

How to set up and validate locally

  1. Open Rails console. In your terminal: rails c
  2. Enable the feature flag:
Feature.enable(:edit_branch_rules)
  1. In a project, go to Settings / Repository
  2. Expand Branch rules section.
  3. Choose an existing rule or create one.
  4. Navigate to Branch rule details page.

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

Related to #438970

Edited by Paulina Sedlak-Jakubowska

Merge request reports