Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wildcard branch protection should allow branch creation #33790

Open
srodionov-cbtw opened this issue Mar 4, 2025 · 1 comment
Open

Wildcard branch protection should allow branch creation #33790

srodionov-cbtw opened this issue Mar 4, 2025 · 1 comment
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@srodionov-cbtw
Copy link

Feature Description

Given a branch protection rule with a wildcard like "release/**" and "disabled push",
as a developer without administrator privileges, I want to be able to create a new branch called release/whatever with the branch creation UI in gitea, as long as no such branch exists.

currently I get the error:
"Gitea: Not allowed to push to protected branch release/whatever"

I want the branch protection to protect existing branches only, while beeing able to create new branches, that once created automatically get the protection.
If necessary it could also be a configurable option, if the branch protection is applied to new branches.

Screenshots

No response

@srodionov-cbtw srodionov-cbtw added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Mar 4, 2025
@jpraet
Copy link
Member

jpraet commented Mar 6, 2025

If this gets implemented, it should be made configurable. I'm using a branch protection for pattern *'* to prevent users from creating branches containing a ', because that causes issues in our CI system. Or an alternative solution should be provided to handle that requirement of enforcing naming conventions for branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

2 participants