-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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 status check pattern #33121
Comments
Gitea uses two different libs to test glob patterns. On the branch protection setting page (the first screenshot), we test the pattern with js code. gitea/web_src/js/features/repo-settings.ts Lines 100 to 117 in 40765b5
On the pull request page (the second screenshot), we test the pattern with go code. gitea/routers/web/repo/pull.go Lines 481 to 496 in 40765b5
So I think the cause of this bug may be related to the go glob library we are using ( As a workaround, maybe you could use two patterns
|
go glob library doesn't support extended syntax (gobwas/glob#3) and
There are two options for solving this as far as I can see:
Second one is obviously easier and I can make a PR for this. |
Underlying go library has no support for it Fixes: #33121 --- I never touched frontend tests so pointers how to write them are welcome. This can be either fix or workaround, depending if this is something gitea should support in the future or not. The golang side is unlikely to get updates though.
By looking at go glob I found out that it was in fact possible without using extended pattern. The syntax is:
|
Description
Hi,
I have a branch protection status check pattern issue. My pattern use a glob and is
**/*@(code_style|affected)
. On the setting page, I see that my CI is marked as match (see first screenshot). But on pull request view same CI passed but a extra line is added with the pattern and written as required (see second screenshot).Gitea Version
1.22.6
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
Git Version
No response
Operating System
No response
How are you running Gitea?
unsure but I think it's docker image
Database
None
The text was updated successfully, but these errors were encountered: