Skip to content

Adds branch exceptions selector project and group level

What does this MR do and why?

This MR resolves 2 issues:

  1. Adding branch exceptions on group level #423434 (closed)
  2. Adding additional options to link any branch from any project for branch exceptions both on project and group level #425145 (closed)

Due to performance concerns (fetching all branches for projects in group), it was decided to use free form input.

Branch and full_path to project can be added as comma separated list in format: branch_name@full_path_to_project.

On project level, if full path is omitted, current project full path will be prepend automatically.

On group level, user will see a validation error.

There is also validation for duplicates.

Review order

Description MR
1 Adding required scss classes !141720 (merged)
2 Adding required util methods !141721 (merged)
3 Adding new required components !141725 (merged)
4 Integrating new components into existing flow and adding tests 👈 This one

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.

Group level After
Loom link to group level overview Loom link to project level overview

How to set up and validate locally

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

  1. Go to Project/Group
  2. Secure -> Policies -> New policy -> New scan result policy
  3. Select rules: Secure, Licence, Any Merge request (works with all)
  4. Select exceptions mode, try to add branches in textarea, switch between rule mode, yaml mode, make sure selection persists
  5. Save policy, and try to edit saved policy with same flow
  6. Repeat same steps for scan execution policy

Related to #423434 (closed) #425145 (closed)

Edited by Artur Fedorov

Merge request reports