Handle rules for deleted branches
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=502579) </details> <!--IssueSummary end--> The old flow for protected branches allowed to: * protect a branch that does not yet exist * display a protection rule for a branch that has been deleted Giving the nature of the new flow, we should mark the rule for a non-existing branch both on the list of branch rules and on the details page. We should handle creating a wildcard rule from a given string, if a branch of that name does not yet exist (see the screenshots below). ### Old flow for protecting a branch #### protect a branch that does not yet exist | step | screenshot | | ------ | ------ | | entering a name of a branch that doesn't exist prompts to set a wildcard of that exact string | ![Screenshot_2024-11-05_at_14.55.00](/uploads/92a543af87ec16eb6670dd184b15b079/Screenshot_2024-11-05_at_14.55.00.png) | | a protection rule is displayed with a note | ![Screenshot_2024-11-05_at_14.55.23](/uploads/73d00cfbe1e012697e4410107059258f/Screenshot_2024-11-05_at_14.55.23.png) | #### display a protection rule for a branch that has been deleted | step | screenshot | | ------ | ------ | | creating a rule for `logs` branch that exists at this point | ![image](/uploads/fbacf50ff97761bd5ae207afb17c7170/image.png) | | [on Branches listing] deleting the branch | ![image__1_](/uploads/21b8346ebc37e9094bedfd60a6321c49/image__1_.png) | | [on Branches listing] confirming the action | ![image__2_](/uploads/8bf6d55765eee80f5b0ac4ed5f3b2b86/image__2_.png) | | a protection rule is displayed with a note | ![image__3_](/uploads/460d4386835ce80496165f34a4f701b3/image__3_.png) |
issue