Path-based hostRules #21678
rarkins
started this conversation in
Suggest an Idea
Replies: 4 comments
|
🤔 I like the idea to add hostRules from managers (eg read from |
0 replies
|
If parsing
|
0 replies
|
|
0 replies
|
Platforms should save the token or username/password passed during Platforms could return one rule for the hostName alone, and another for hostName + hostType, to allow for cases where managers search for rules by hostType. hostRules order:
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
What would you like Renovate to be able to do?
Support greater granularity of
hostRules. There may be cases where they are specific to a certain path, for example.Describe the solution you'd like
Concrete example: npm
.npmrcor Composerauth.jsoncould be found within subdirectories, and maybe more than one per repo if it's a monorepo.Describe alternatives you've considered
Currently our
hostRulesare "global" for the repo. This was partly to save ourselves passing extra config around, but also as a part security feature that decreased the chance that thehostRulesconfig is accidentally leaked.Additional context
There's may be three possible ways to implement this:
Approach 1: add optional path and package awareness to hostRules
This would retain the "global" hostRules but allow them to be configured with paths and maybe package names. However this solution would require all calls to our
gotwrapper to include filename and/or package name information.Approach 2: refactor
hostRulesso that they are kept in config likepackageRulesare, and passed "down the chain". This would allow a hostRule to be returned from an extract function, for example - or maybe even embedded within a packageRule. This would require that the config is passed all the way to ourgotwrapper so thathostRulescan be read.Approach 3: deprecate
hostRulesand merge all concepts intopackageRules. Not sure this is really feasible though.All reactions