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

Branch Protection Impossible For New Repositories #15705

Closed
1 of 6 tasks
muellert opened this issue May 3, 2021 · 3 comments
Closed
1 of 6 tasks

Branch Protection Impossible For New Repositories #15705

muellert opened this issue May 3, 2021 · 3 comments
Labels
type/enhancement An improvement of existing functionality
Milestone

Comments

@muellert
Copy link

muellert commented May 3, 2021

  • Gitea version (or commit ref): 1.14.1
  • Git version: n/a
  • Operating system: n/a
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL) any, really
    • No
  • Log gist:

Description

If I create a new repository, it is initially empty. In this case, I cannot set up branch protection, at least not via the UI.

Maybe templating could work around this?

...

Screenshots

20210503-gitea-repo-in-use
20210503-gitea-new-repo

@KN4CK3R
Copy link
Member

KN4CK3R commented May 3, 2021

I noticed that too while implementing #15629 but did not add that restriction there. At the moment you must select an existing branch to enable branch protection. As an empty repository does not have branches that tab is stripped. #2529 might want this too.

@KN4CK3R KN4CK3R added the type/enhancement An improvement of existing functionality label May 3, 2021
@lunny
Copy link
Member

lunny commented Oct 19, 2022

Will also be fixed by #20825

lunny added a commit that referenced this issue Jan 16, 2023
This PR introduce glob match for protected branch name. The separator is
`/` and you can use `*` matching non-separator chars and use `**` across
separator.

It also supports input an exist or non-exist branch name as matching
condition and branch name condition has high priority than glob rule.

Should fix #2529 and #15705

screenshots

<img width="1160" alt="image"
src="https://user-images.githubusercontent.com/81045/205651179-ebb5492a-4ade-4bb4-a13c-965e8c927063.png">

Co-authored-by: zeripath <art27@cantab.net>
@lunny
Copy link
Member

lunny commented Jan 16, 2023

Fixed by #20825

@lunny lunny closed this as completed Jan 16, 2023
@lunny lunny added this to the 1.19.0 milestone Jan 16, 2023
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/enhancement An improvement of existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants