Skip to content

Do not render empty MR approval rule on Branch rule details

What does this MR do and why?

We are using project MR approval app in two locations:

  • Project settings / Merge Requests
  • Project settings / Repository / Branch rule details

On Branch rule details, we don't want the empty any_approval rule. We only want the rules that apply to that branch name as a target branch.

The pagination also was shown based on the number of rules from Project settings / Merge Requests, so I hid it for the time being, assuming that only a fracture of all the rules are shown for a single branch.

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
Screen Recording 2024-07-01 at 14.51.25.mov Screen Recording 2024-07-01 at 14.49.45.mov

How to set up and validate locally

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

  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. Create a new Merge Request approval rule for a specific branch.

Related to #456976 (closed)

Edited by Paulina Sedlak-Jakubowska

Merge request reports