-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: regex manager #5617
feat: regex manager #5617
Conversation
|
Here is it in action with a |
…m-manager # Conflicts: # lib/config/common.ts
lib/manager/common.ts
Outdated
export interface CustomExtractConfig extends ExtractConfig { | ||
matchStrings: string[]; | ||
depNameTemplate?: string; | ||
lookupNameTemplate?: string; | ||
currentValueTemplate?: string; | ||
datasourceTemplate?: string; | ||
versioningTemplate?: string; | ||
} | ||
|
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 reuse the CustomManager
interface above? We can move it to the lib/types
path.
export interface CustomExtractConfig extends ExtractConfig { | |
matchStrings: string[]; | |
depNameTemplate?: string; | |
lookupNameTemplate?: string; | |
currentValueTemplate?: string; | |
datasourceTemplate?: string; | |
versioningTemplate?: string; | |
} | |
export type CustomExtractConfig = CustomManager & ExtractConfig; |
No real comments on the code, looks fine. Maybe just some more explicit typing? Naming is hard, but to me |
Co-Authored-By: Michael Kriese <michael.kriese@visualon.de>
Code looks fine to me as well. As previously discussed on Slack, I think this is a great feature which has a lot of potential for using Renovate to manage dependencies in very specific situations. Can't really decide on a name and I think both |
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.
patternManagers
sounds good.
I'm leaning towards
I think no matter what we call it, there will be some confusion about whether it's "managing regexes" rather than being a "regex-based manager". I don't like Also, I'm not sure why associating the name with "plugins" is a bad thing? In a way I think it sort of is like supporting manager plugins - just that they're regex-based. BTW renaming and migrating later if we change our mind isn't too hard to do anyway. |
I think I'll leaving typing as-is for now but feel free to refactor it later. Any objections to merging? |
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.
LGTM
This is awesome! href="(?<packageName>)-(?<version>).apk" |
@felixfbecker we’ll need to add an apk datasource first, then it should be feasible. We don’t yet have “regex datasources” too :) |
I see. |
I thought I could get by with using Node's GitHub release tags, but Alpine node releases are always also tagged with Btw, is there an official JSON schema I can use to get autocompletion while trying this out? The one in JSONSchemaStore is missing a lot of config by now |
Yes, we updated our official schema to point to docs.renovatebot.com/renovate-schema.json and it’s automatically built from master using submodule updating (which you were also interested in). It might trail master by an hour or two most times |
Maybe JSON schema store could be configured to redirect to that, as many tools use it as an API to auto-discover schemas :) |
Oh, just noticed that was already done 💯 |
Adds initial support for custom/generic/regex managers.
Closes #1938