Fix Branch rules for branch names containing special chars
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 |
---|---|
How to set up and validate locally
- Enable the
branch_rules
feature flag. - Create a branch with special characters in the name (e.g.
test-$-%-branch
). - Create a branch protection for the branch created in step 2.
- Navigate to Settings > Repository > Branch rules.
- Click on Details next to the branch created in step 2.
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Jacques Erasmus