Skip to content

Update policy rules to include a branches label

Alexander Turinske requested to merge 359885-update-rule-label into master

What does this MR do and why?

Update policy rules to include a branches label

  • it adds either "branch" or "branches" after a user selects branches
  • for scan execution, I add "branch" for a single branch that does not include the wildcard operator (*) and branches for all other scenarios. I used branches for if a single branch has the wildcard operator (*) because the wildcard operator means that multiple branches will be referenced
  • for scan result policies, I add "branch" for if a branch is selected and nothing if nothing is selected because the dropdown says All branches

Changelog: changed

EE: true

Screenshots or screen recordings

scan execution scan result
scan_execution scan_result

How to set up and validate locally

  1. Upload a GitLab Ultimate license
  2. Turn on the :scan_execution_rule_mode feature flag
  3. Navigate to a project => Security & Compliance => Policies => New policy => Scan Execution Policy
  4. Type in a series of branches and ensure the label updates
  5. Navigate to a group => Security & Compliance => Policies => New policy => Scan Result Policy
  6. Select a branch and verify the branches label updates

MR acceptance checklist

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

Related to #359885 (closed)

Edited by Alexander Turinske

Merge request reports

Loading