-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix(types): add all globalOnly=true options to RepoGlobalConfig
#24115
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
fix(types): add all globalOnly=true options to RepoGlobalConfig
#24115
Conversation
GlobalConfig.OPTIONS includes all options with globalOnly=trueGlobalConfig.OPTIONS
GlobalConfig.OPTIONSGlobalConfig.OPTIONS and RepoGlobalConfig
GlobalConfig.OPTIONS and RepoGlobalConfigGlobalConfig.OPTIONS and RepoGlobalConfig
GlobalConfig.OPTIONS and RepoGlobalConfigglobalOnly=true options to RepoGlobalConfig
| 'autodiscover', | ||
| 'autodiscoverFilter', | ||
| 'autodiscoverTopics', |
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.
Will ones like this still be deleted from config at an early stage, and not copied available via GlobalConfig.get()?
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.
These options will now be available via GlobalConfig.get().
They weren't available previously, because they were present in GlobalConfig.OPTIONS and were ignored by GlobalConfig,set(). The logic thought these weren't global config options., therefore instead of setting it to GlobalConfig it just returned it and then they got added to the repoConfig (renovate.json).
This happens here:
renovate/lib/workers/repository/index.ts
Lines 41 to 43 in effb8b6
| let config = GlobalConfig.set( | |
| applySecretsToConfig(repoConfig, undefined, false) | |
| ); |
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.
I don't think we ever want to GlobalConfig.get() them. So the question is whether this is a bad thing or not.
viceice
left a comment
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.
needs real tests, I think it also needs more code changes to use the global config get function. otherwise this probably breaks existing behavior.
Yes. Should I divide this into multiple PRs each targeting a related group of options |
| 'force', | ||
| 'forceCli', | ||
| 'forkOrg', | ||
| 'forkToken', |
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.
No, this is definition not right
| 'requireConfig', | ||
| 'secrets', | ||
| 'skipInstalls', | ||
| 'token', |
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.
Not right
rarkins
left a comment
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.
Please go back to the issue and discuss approaches there instead. This does not seem like the right approach
Changes
globalOnly=trueoptions toRepoGlobalConfigGlobalConfig.OPTIONSGlobalConfig.OPTIONSincludes all options withglobalOnly=truefor consistency in futureContext
Closes: #9603
Doing this as a part of #23868
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: