Skip to content

Fix Branch rules for branch names containing special chars

Jacques Erasmus requested to merge fix-branch-rules-special-chars into master

What does this MR do and why?

The Branch rules page does not load if a branch name contains special characters. This fixes the issue by encoding the branch name.

Screenshots or screen recordings

before after
Screenshot_2023-02-22_at_14.13.14 Screenshot_2023-02-22_at_14.13.34

How to set up and validate locally

  1. Enable the branch_rules feature flag.
  2. Create a branch with special characters in the name (e.g. test-$-%-branch).
  3. Create a branch protection for the branch created in step 2.
  4. Navigate to Settings > Repository > Branch rules.
  5. Click on Details next to the branch created in step 2.
  6. The Details page should load as expected.

MR acceptance checklist

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

Edited by Jacques Erasmus

Merge request reports

Loading