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

Specific branch protection doesn't (always) override wildcard protection #24044

Closed
eNBeWe opened this issue Apr 11, 2023 · 0 comments · Fixed by #24045
Closed

Specific branch protection doesn't (always) override wildcard protection #24044

eNBeWe opened this issue Apr 11, 2023 · 0 comments · Fixed by #24045
Labels
Milestone

Comments

@eNBeWe
Copy link

eNBeWe commented Apr 11, 2023

Description

We have configured branch protections for lots of branches (think: all release branches).
Usually pushing on these branches should be forbidden, but during the release cycle the new release should be open to backport fixes and stuff.
So we create a wildcard protection "release/**" that denies all pushes and a specific protection "release/v1.0.0" that allows pushes from specific users.
The resulting behaviour is not always the same.

Sometimes it looks like this:
grafik
In this case, the global protection is always in place and no pushing is possible on any branch.

Sometimes the two rows of glob and specific are switched (specific first, glob second).
Then the specific protection works and the allowed user can push that branch.

To me it looks like some kind of issue with ordering the protections. But I didn't find a way to "force" some ordering by e. g. creating the protections in a specific order or by a naming scheme.

Test Repo at try.gitea.io: https://try.gitea.io/eNBeWe/TestFooBar

Gitea Version

1.19.0+28-g81a995cd8

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

2.25.1

Operating System

Ubuntu Linux 20.04.6

How are you running Gitea?

Binary installation according to docs, using systemd.

Database

PostgreSQL

@lunny lunny added this to the 1.19.1 milestone Apr 11, 2023
6543 pushed a commit that referenced this issue Apr 11, 2023
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Apr 11, 2023
6543 pushed a commit that referenced this issue Apr 11, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants