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
feat(autodiscover): allow usage of regex patterns #13243
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.
Can we validate the regex too?
Co-authored-by: Rhys Arkins <rhys@arkins.net>
The regex is validated implicitly in https://github.com/renovatebot/renovate/blob/main/lib/util/regex.ts#L35 |
What's the CLI output look like if it's invalid regex? |
There are no explicit lines in that case, as Renovate tries to parse it with minimatch
|
That's what I wanted to avoid. If they wrap it in |
new output:
|
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
🎉 This PR is included in version 31.30.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
@@ -72,4 +72,42 @@ describe('workers/global/autodiscover', () => { | |||
const res = await autodiscoverRepositories(config); | |||
expect(res).toEqual(config); | |||
}); | |||
it('filters autodiscovered github repos with regex', async () => { | |||
config.autodiscover = true; | |||
config.autodiscoverFilter = '/project/re*./'; |
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.
This expression isn't wrong per se, but I would consider it confusing.
Changes:
Allow to use regex for
autodiscoverFilter
.Context:
Discussion: #13168 (comment)
Part of #8763
Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via: