Branch protection rule, pattern didn't prevent branch deletion and ignores Approvals count #12599

Closed
opened 2025-11-02 10:15:43 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @makar112233 on GitHub (Mar 5, 2024).

Description

Hi.
In Gitea 1.21.5 I had a branch protection rule for "master", which required "Success" status from build server.
After updating to Gitea 1.21.7, this rule become to ignore branch "master" and starts working only for branch which named "^master$".
But on the other hand, after renaming branch "master"->"^master$" I lost two things:

  1. Prevent branch deletion stopped to work;
  2. Minimal approval stopped to work;

Could you help me with it?

Gitea Version

1.21.7

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

Situation for "master"
master1
master2
master3
master4
Situation for "^master$"
newmaster1
newmaster2
newmaster3
newmaster4

Git Version

No response

Operating System

No response

How are you running Gitea?

Self-hosted

Database

PostgreSQL

Originally created by @makar112233 on GitHub (Mar 5, 2024). ### Description Hi. In Gitea 1.21.5 I had a branch protection rule for "master", which required "Success" status from build server. After updating to Gitea 1.21.7, this rule become to ignore branch "master" and starts working only for branch which named "^master$". But on the other hand, after renaming branch "master"->"^master$" I lost two things: 1. Prevent branch deletion stopped to work; 2. Minimal approval stopped to work; Could you help me with it? ### Gitea Version 1.21.7 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots Situation for "master" ![master1](https://github.com/go-gitea/gitea/assets/122980447/5c304df4-7440-4d21-8acb-460f40861f3f) ![master2](https://github.com/go-gitea/gitea/assets/122980447/97c27086-4f65-46e4-a1cb-c4f394728a92) ![master3](https://github.com/go-gitea/gitea/assets/122980447/6008cd1c-8380-41f5-b033-1ad31c71631b) ![master4](https://github.com/go-gitea/gitea/assets/122980447/793d553a-d7d5-4a17-bc53-dedfb8cc749b) Situation for "^master$" ![newmaster1](https://github.com/go-gitea/gitea/assets/122980447/57f1e584-ae0c-4bd1-afa7-c5ea98d6844d) ![newmaster2](https://github.com/go-gitea/gitea/assets/122980447/ef3b76fa-35ee-47dd-9811-f59d579db057) ![newmaster3](https://github.com/go-gitea/gitea/assets/122980447/5b43b8da-82d8-4181-8604-0c1fec06c8a6) ![newmaster4](https://github.com/go-gitea/gitea/assets/122980447/c5f2c3e6-dd99-4751-914e-5a0c886e9f34) ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Self-hosted ### Database PostgreSQL
GiteaMirror added the type/bug label 2025-11-02 10:15:43 -06:00
Author
Owner

@makar112233 commented on GitHub (Mar 5, 2024):

My bad, didn't check documentation

@makar112233 commented on GitHub (Mar 5, 2024): My bad, didn't check documentation
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12599