Protected Branches allows adding the same wildcard twice
Summary
When protecting branches using wildcards, it is possible to list the same wildcard multiple times with different protections. The duplicated protected branch shows up multiple times in the database as well. The same issue does not occur for specific branches, since they do not appear on the drop down menu after being protected.
Steps to reproduce
Create a wildcard protected branch with any permissions.
Create a new wildcard protected branch with the same name as before, and with different (or the same) permissions.
What is the current bug behavior?
The wildcard protected branch is created twice.
What is the expected correct behavior?
Either the wildcard protected branch should be updated in the protected branches table below, or an error message should appear.
Relevant logs and/or screenshots
Edited by 🤖 GitLab Bot 🤖
