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

packageRule matching a given regex configuration of RegexManager #12276

Closed
sclorng opened this issue Oct 22, 2021 · 6 comments · Fixed by #12287
Closed

packageRule matching a given regex configuration of RegexManager #12276

sclorng opened this issue Oct 22, 2021 · 6 comments · Fixed by #12287
Labels
manager:regex priority-4-low Low priority, unlikely to be done unless it becomes important to more people status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality)

Comments

@sclorng
Copy link

sclorng commented Oct 22, 2021

What would you like Renovate to be able to do?

I would like to be able to identify a configuration set of RegexManager to apply a package rule.

matchManagers is not enough to target a given configuration.

If you have any ideas on how this should be implemented, please tell us here.

matchDepTypes could be used but we cannot set it on regex manager dependencies.

We could add depType as a valid validMatchFields.

Is this a feature you are interested in implementing yourself?

No

@sclorng sclorng added priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality) labels Oct 22, 2021
@rarkins
Copy link
Collaborator

rarkins commented Oct 22, 2021

Can you describe more about why you need this capability? Maybe we can work out another way.

You might also try working around it by using depName and lookupName. matchPackageNames/Patterns is based on depName

@sclorng
Copy link
Author

sclorng commented Oct 22, 2021

oh yes, that should work. Actually, I need a key to group docker image dependencies together and I was worried of what will be displayed in the MR if the depName is all the same.

@sclorng
Copy link
Author

sclorng commented Oct 22, 2021

It works, but the package name in the MR is now depName for all of them.

@rarkins
Copy link
Collaborator

rarkins commented Oct 23, 2021

Possible ideas:

  • Allow depType to be configured using regex manager, or
  • Allow regex managers be given their own optional manager name

Probably depType is best?

@sclorng
Copy link
Author

sclorng commented Oct 23, 2021

depType seems to be easier to do by adding it to the list

const validMatchFields = [
'depName',
'lookupName',
'currentValue',
'currentDigest',
'datasource',
'versioning',
'extractVersion',
'registryUrl',

rarkins added a commit to scrocquesel/renovate that referenced this issue Oct 24, 2021
viceice added a commit to scrocquesel/renovate that referenced this issue Oct 24, 2021
@secustor secustor added manager:regex priority-4-low Low priority, unlikely to be done unless it becomes important to more people and removed priority-5-triage labels Oct 24, 2021
rarkins added a commit to scrocquesel/renovate that referenced this issue Oct 25, 2021
@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 28.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
manager:regex priority-4-low Low priority, unlikely to be done unless it becomes important to more people status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants