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

Tag name rules #30960

Open
3 tasks done
sadorowo opened this issue May 13, 2024 · 0 comments
Open
3 tasks done

Tag name rules #30960

sadorowo opened this issue May 13, 2024 · 0 comments
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@sadorowo
Copy link

sadorowo commented May 13, 2024

Feature Description

Idea

I think it would be great if Gitea had something like tag name rules. This would be the exact opposite of tag protection - repository administrators will be able to set up, for example, a regular expression or glob, to match tags.

If tag name wouldn't match, it will be rejected.

Why not use tag protection?

Someone will say:
We have already tag protection. Assume you have regular expression like this:

^\Av\d+\.\d+\.\d+\z$

Just use negative lookahead, and slightly modify your regex...

^(?!\Av\d+\.\d+\.\d+\z).*$

...and everything will be fine - no need to create another feature!

Unfortunately this is not possible, because we can't use negative lookahead - Go regexp uses RE2 syntax, not PCRE.

Conclusion

  • we would be sure that the tag names are correct
  • it's not that hard to implement, because you have already done tag protection
  • GitHub doesn't have this 👀

Screenshots

image

@sadorowo sadorowo added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label May 13, 2024
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

1 participant