[go: up one dir, main page]

Skip to content

Handle rules for deleted branches

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

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
a protection rule is displayed with a note Screenshot_2024-11-05_at_14.55.23

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
[on Branches listing] deleting the branch image__1_
[on Branches listing] confirming the action image__2_
a protection rule is displayed with a note image__3_
Edited by 🤖 GitLab Bot 🤖