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

Why this Glob pattern doesn't match? #173

Open
shinebayar-g opened this issue Nov 6, 2024 · 4 comments
Open

Why this Glob pattern doesn't match? #173

shinebayar-g opened this issue Nov 6, 2024 · 4 comments
Milestone

Comments

@shinebayar-g
Copy link

Suppose I have this link https://foo.work.com/bar. I created a Glob rule https://*.work.com/*. It's not matching.
I just wanted to check if the url matches the subdomain.

@U-C-S
Copy link
Owner

U-C-S commented Nov 7, 2024

(Away from my PC, so couldn't verify why it's not working)

Glob rules have lot of issues currently (since globs in general are meant for file paths, not URLs but I implemented it anyway back then). I plan to rewrite it some point in future to fully support URLs.

You can use domain rule as a replacement (for your example, rule could be foo.work.com, foo1.work.com, foo2.work.com).

@shinebayar-g
Copy link
Author

Gotcha sub domains will work for me. For Github Cloud, what's the easiest rule? I need something like https://github.com/corp/*

@U-C-S
Copy link
Owner

U-C-S commented Nov 8, 2024

You can use Regex there: .*github.com/corp/.*

@U-C-S U-C-S added this to the v0.10 milestone Nov 11, 2024
@U-C-S
Copy link
Owner

U-C-S commented Nov 11, 2024

Will try to fix glob rules soon.


DevNotes

  • maybe have a glob-to-regex fn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants