Enable templating on inheritConfigFileName
#44718
castielwaverly
started this conversation in
Suggest an Idea
Replies: 1 comment
-
|
PR welcome |
Beta Was this translation helpful? Give feedback.
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.
-
Tell us more.
Currently this is supported in inheritConfigRepoName, which lets you do fancy stuff like define onboarding configs per organization under
{{ myOrg }}/renovate-config.One thing this doesn't let you do, however, is have a single "renovate control panel" repo to manage all repos across all orgs. If you could template
inheritConfigFileName, you would be able to place these files in nested folders in a single repo, making management more streamlined.For example, instead of creating N
{{ orgN }}/renovate-configrepos with each of their own onboarding configs, you would instead create N{{ orgN }}/org-inherited-config.jsonfiles in your one repo and specify:In general, it's much easier managing multiple files in one repo than the "same" files across many repos, though I wonder if this was left out intentionally to prevent some clever abuse I can't think of at the moment.
In any case, I did take a look at the code...
The unparsed template for
inheritConfigRepoNameis parsed here:renovate/lib/workers/repository/init/inherited.ts
Lines 48 to 52 in 6f577f0
Which then is used to get the raw config file here:
renovate/lib/workers/repository/init/inherited.ts
Lines 62 to 65 in 6f577f0
There may be additional complexities elsewhere, but it does seem like
inheritConfigFileNamecan be "elevated" to a templated configuration with...and a few more search and replaces, of course
It does feel like the quality of life improvement is about on par with the complexity of the required change to achieve said improvement. Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions