-
Notifications
You must be signed in to change notification settings - Fork 249
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
Simplify glob pattern #2569
Simplify glob pattern #2569
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, what I was alluding to earlier is that foo/**/**
could be simplified to foo/**
to match the branches that I think we want to match.
It worked in the OTel.io settings:
Note the match given the pattern opentelemetrybot/**
.
According to the GH docs, https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/creating-rulesets-for-a-repository#using-fnmatch-syntax. The base docs of fnmatch are https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch.
According to Copilot:
When applied to branch names, the
**
pattern in fnmatch matches substrings recursively, treating slashes as ordinary characters.
The quote above supports my claim that **
should be enough. WDYT?
I tried |
Yeah, I can see that. Funny: to me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
Follow-up to @chalin's #2548 (comment)