-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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(config)!: parse JSON5/YAML self-hosted admin config #12644
Merged
rarkins
merged 20 commits into
renovatebot:main
from
nejch:feat/config-self-hosted-yaml-json5
Dec 9, 2021
Merged
feat(config)!: parse JSON5/YAML self-hosted admin config #12644
rarkins
merged 20 commits into
renovatebot:main
from
nejch:feat/config-self-hosted-yaml-json5
Dec 9, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nejch
commented
Nov 14, 2021
viceice
reviewed
Nov 14, 2021
6 tasks
nejch
commented
Nov 17, 2021
viceice
reviewed
Nov 17, 2021
viceice
reviewed
Nov 17, 2021
rarkins
reviewed
Nov 24, 2021
BREAKING CHANGE: Renovate will now fail if RENOVATE_CONFIG_FILE does have a file extension provided.
viceice
reviewed
Nov 29, 2021
rarkins
reviewed
Nov 29, 2021
Co-authored-by: Michael Kriese <[email protected]>
viceice
reviewed
Dec 9, 2021
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.
just some small test stuff
viceice
previously approved these changes
Dec 9, 2021
rarkins
changed the title
feat: parse JSON5/YAML self-hosted admin config
feat!: parse JSON5/YAML self-hosted admin config
Dec 9, 2021
rarkins
changed the title
feat!: parse JSON5/YAML self-hosted admin config
feat(config)!: parse JSON5/YAML self-hosted admin config
Dec 9, 2021
🎉 This PR is included in version 30.0.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Thanks for taking this over the finish line! There was a bit of ping pong there at the end for me, sorry :) |
pmorch
added a commit
to pmorch/renovate
that referenced
this pull request
Dec 12, 2021
module.exports can now be a function and it can be/return a Promise, allowing the results of asynchronous operations to be used in the configuration. The discussion leading up to this PR in renovatebot#13035 assumed that module.exports had to be a plain object. But this commit: commit 9aa97af Author: Nejc Habjan <[email protected]> Date: Thu Dec 9 13:45:48 2021 +0100 feat(config)!: parse JSON5/YAML self-hosted admin config (renovatebot#12644) Adds support for alternative admin config file formats. BREAKING CHANGE: Renovate will now fail if RENOVATE_CONFIG_FILE is specified without a file extension Had as an undocumented side effect, that it also handled transparenty if module.exports was assigned a Promise. With that commit, the promise will be await-ed so the resolved value is returned from getConfig(). That was not the case before that commit. So in this commit, configs that export functions are handled, and test cases for both promises and functions have been added.
pmorch
added a commit
to pmorch/renovate
that referenced
this pull request
Dec 13, 2021
…atebot#12644) The code was introduced in 9aa97af and here is the documentation to go with it
6 tasks
viceice
added a commit
that referenced
this pull request
Dec 13, 2021
* feat(config): allow exporting async config (#13035) module.exports can now be a function and it can be/return a Promise, allowing the results of asynchronous operations to be used in the configuration. The discussion leading up to this PR in #13035 assumed that module.exports had to be a plain object. But this commit: commit 9aa97af Author: Nejc Habjan <[email protected]> Date: Thu Dec 9 13:45:48 2021 +0100 feat(config)!: parse JSON5/YAML self-hosted admin config (#12644) Adds support for alternative admin config file formats. BREAKING CHANGE: Renovate will now fail if RENOVATE_CONFIG_FILE is specified without a file extension Had as an undocumented side effect, that it also handled transparenty if module.exports was assigned a Promise. With that commit, the promise will be await-ed so the resolved value is returned from getConfig(). That was not the case before that commit. So in this commit, configs that export functions are handled, and test cases for both promises and functions have been added. * Update lib/workers/global/config/parse/__fixtures__/fileAsyncFunction.js Co-authored-by: HonkingGoose <[email protected]> * Update lib/workers/global/config/parse/__fixtures__/fileFunctionPromise.js Co-authored-by: HonkingGoose <[email protected]> * feat(config): Fixed linter problems (#13035) * feat(config)!: Add doc for JSON5/YAML self-hosted admin config (#12644) The code was introduced in 9aa97af and here is the documentation to go with it * feat(config): Document config.js exports (#13035) * feat(config): Rename file*.js to config*.js because they really are config (#13035) * Update docs/usage/getting-started/running.md Co-authored-by: HonkingGoose <[email protected]> * Update docs/usage/getting-started/running.md Co-authored-by: HonkingGoose <[email protected]> Co-authored-by: HonkingGoose <[email protected]> Co-authored-by: Michael Kriese <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes:
Parses
.json5
and.yaml
/.yml
config files for self-hosted bots if they are defined usingRENOVATE_CONFIG_FILE
.Context:
Closes #7882.
It is also IMO the tiniest, least invasive next change (after #12196) towards #7031.
I deliberately say "parse" rather than "support" since I assume you want to cover all config files (project + preset) before officially supporting this.
However, if you'd like to already include this in docs, I could update renovatebot/renovatebot.github.io#65 to be configurable and only generate json+yaml blocks based on a file filter, e.g.
docs/self-hosted-*.md
or something. Just let me know.Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via: