Allow selecting protected branches by pattern #6753

Closed
opened 2025-11-02 07:05:35 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @jsil3601 on GitHub (Jan 25, 2021).

This is a suggestion for improvement.
My knowledge of gitea code or go Lang is insufficient to pr this.

Currently, to add a branch to 'branch protection' , we need to create the branch, goto repo settings, and then select it individually from drop down, and set its security setting (allowed push teams, voters etc).
This means every time we have a new release branch, we need to go through this process, which is repetitive and prone to human error.

It will be very helpful if we could add a pattern, (such as release*, similar to how we select branches by pattern in the 'webhooks' page) thus allowing to select the protection settings by pattern and not one by one. As new branches are added in the future if they match the pattern they will also be protected.

Is this feature interesting to the gitea community /devs?

Thanks

Originally created by @jsil3601 on GitHub (Jan 25, 2021). This is a suggestion for improvement. My knowledge of gitea code or go Lang is insufficient to pr this. Currently, to add a branch to 'branch protection' , we need to create the branch, goto repo settings, and then select it individually from drop down, and set its security setting (allowed push teams, voters etc). This means every time we have a new release branch, we need to go through this process, which is repetitive and prone to human error. It will be very helpful if we could add a pattern, (such as release*, similar to how we select branches by pattern in the 'webhooks' page) thus allowing to select the protection settings by pattern and not one by one. As new branches are added in the future if they match the pattern they will also be protected. Is this feature interesting to the gitea community /devs? Thanks
GiteaMirror added the issue/duplicate label 2025-11-02 07:05:35 -06:00
Author
Owner

@lunny commented on GitHub (Jan 26, 2021):

Hm, I think there is already an issue to report this.

@lunny commented on GitHub (Jan 26, 2021): Hm, I think there is already an issue to report this.
Author
Owner

@jsil3601 commented on GitHub (Jan 26, 2021):

I didn't find such an issue... Is this something that's planned for implementation?

@jsil3601 commented on GitHub (Jan 26, 2021): I didn't find such an issue... Is this something that's planned for implementation?
Author
Owner

@lunny commented on GitHub (Jan 26, 2021):

I think this is a duplicate of #2529 . There is no plan for that.

@lunny commented on GitHub (Jan 26, 2021): I think this is a duplicate of #2529 . There is no plan for that.
Author
Owner

@jsil3601 commented on GitHub (Jan 30, 2021):

Yes you are right it's a duplicate. Can this be looked at for a future release?

@jsil3601 commented on GitHub (Jan 30, 2021): Yes you are right it's a duplicate. Can this be looked at for a future release?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6753