Skip to content
Snippets Groups Projects
Commit a69376ab authored by Rhys Arkins's avatar Rhys Arkins
Browse files

feat: printConfig

Adds an option to print the full, resolved config for a repo at INFO level. e.g.

renovate —print-config owner/repo

Closes https://github.com/renovatebot/config-help/issues/128
parent 00de6f2e
No related merge requests found
...@@ -56,6 +56,14 @@ const options = [ ...@@ -56,6 +56,14 @@ const options = [
admin: true, admin: true,
default: false, default: false,
}, },
{
name: 'printConfig',
description:
'If enabled, Renovate will log the full config for each repo, including resolved presets',
type: 'boolean',
admin: true,
default: false,
},
{ {
name: 'binarySource', name: 'binarySource',
description: 'Where to source binaries like `npm` and `yarn` from', description: 'Where to source binaries like `npm` and `yarn` from',
......
...@@ -22,6 +22,10 @@ async function initRepo(input) { ...@@ -22,6 +22,10 @@ async function initRepo(input) {
config = await checkBaseBranch(config); config = await checkBaseBranch(config);
config.semanticCommits = await detectSemanticCommits(config); config.semanticCommits = await detectSemanticCommits(config);
config = await detectVulnerabilityAlerts(config); config = await detectVulnerabilityAlerts(config);
// istanbul ignore if
if (config.printConfig) {
logger.info({ config }, 'Full resolved config including presets');
}
return config; return config;
} }
......
...@@ -64,6 +64,7 @@ Array [ ...@@ -64,6 +64,7 @@ Array [
"prHourlyLimit": 0, "prHourlyLimit": 0,
"prNotPendingHours": 25, "prNotPendingHours": 25,
"prTitle": null, "prTitle": null,
"printConfig": false,
"rangeStrategy": "replace", "rangeStrategy": "replace",
"rebaseLabel": "rebase", "rebaseLabel": "rebase",
"rebaseStalePrs": null, "rebaseStalePrs": null,
...@@ -157,6 +158,7 @@ Array [ ...@@ -157,6 +158,7 @@ Array [
"prHourlyLimit": 0, "prHourlyLimit": 0,
"prNotPendingHours": 25, "prNotPendingHours": 25,
"prTitle": null, "prTitle": null,
"printConfig": false,
"rangeStrategy": "replace", "rangeStrategy": "replace",
"rebaseLabel": "rebase", "rebaseLabel": "rebase",
"rebaseStalePrs": null, "rebaseStalePrs": null,
...@@ -247,6 +249,7 @@ Array [ ...@@ -247,6 +249,7 @@ Array [
"prHourlyLimit": 0, "prHourlyLimit": 0,
"prNotPendingHours": 25, "prNotPendingHours": 25,
"prTitle": null, "prTitle": null,
"printConfig": false,
"rangeStrategy": "replace", "rangeStrategy": "replace",
"rebaseLabel": "rebase", "rebaseLabel": "rebase",
"rebaseStalePrs": true, "rebaseStalePrs": true,
...@@ -343,6 +346,7 @@ Array [ ...@@ -343,6 +346,7 @@ Array [
"prHourlyLimit": 0, "prHourlyLimit": 0,
"prNotPendingHours": 25, "prNotPendingHours": 25,
"prTitle": null, "prTitle": null,
"printConfig": false,
"rangeStrategy": "replace", "rangeStrategy": "replace",
"rebaseLabel": "rebase", "rebaseLabel": "rebase",
"rebaseStalePrs": null, "rebaseStalePrs": null,
...@@ -433,6 +437,7 @@ Array [ ...@@ -433,6 +437,7 @@ Array [
"prHourlyLimit": 0, "prHourlyLimit": 0,
"prNotPendingHours": 25, "prNotPendingHours": 25,
"prTitle": null, "prTitle": null,
"printConfig": false,
"rangeStrategy": "replace", "rangeStrategy": "replace",
"rebaseLabel": "rebase", "rebaseLabel": "rebase",
"rebaseStalePrs": true, "rebaseStalePrs": true,
...@@ -529,6 +534,7 @@ Array [ ...@@ -529,6 +534,7 @@ Array [
"prHourlyLimit": 0, "prHourlyLimit": 0,
"prNotPendingHours": 25, "prNotPendingHours": 25,
"prTitle": null, "prTitle": null,
"printConfig": false,
"rangeStrategy": "replace", "rangeStrategy": "replace",
"rebaseLabel": "rebase", "rebaseLabel": "rebase",
"rebaseStalePrs": null, "rebaseStalePrs": null,
...@@ -622,6 +628,7 @@ Array [ ...@@ -622,6 +628,7 @@ Array [
"prHourlyLimit": 0, "prHourlyLimit": 0,
"prNotPendingHours": 25, "prNotPendingHours": 25,
"prTitle": null, "prTitle": null,
"printConfig": false,
"rangeStrategy": "replace", "rangeStrategy": "replace",
"rebaseLabel": "rebase", "rebaseLabel": "rebase",
"rebaseStalePrs": null, "rebaseStalePrs": null,
...@@ -715,6 +722,7 @@ Array [ ...@@ -715,6 +722,7 @@ Array [
"prHourlyLimit": 0, "prHourlyLimit": 0,
"prNotPendingHours": 25, "prNotPendingHours": 25,
"prTitle": null, "prTitle": null,
"printConfig": false,
"rangeStrategy": "replace", "rangeStrategy": "replace",
"rebaseLabel": "rebase", "rebaseLabel": "rebase",
"rebaseStalePrs": null, "rebaseStalePrs": null,
......
...@@ -66,6 +66,10 @@ Set this to `false` if (a) you configure Renovate entirely on the bot side (i.e. ...@@ -66,6 +66,10 @@ Set this to `false` if (a) you configure Renovate entirely on the bot side (i.e.
## prFooter ## prFooter
## printConfig
This option is useful for troubleshooting, particularly if using presets. e.g. run `renovate foo/bar --print-config > config.log` and the fully-resolved config will be included in the log file.
## privateKey ## privateKey
## repositories ## repositories
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment