diff --git a/lib/config/env.js b/lib/config/env.js index 295659128d..4375175622 100644 --- a/lib/config/env.js +++ b/lib/config/env.js @@ -2,30 +2,11 @@ const logger = require('winston'); const config = {}; -if (process.env.RENOVATE_REPOSITORIES) { - config.repositories = list(process.env.RENOVATE_REPOSITORIES); +if (process.env.RENOVATE_TOKEN) { + config.token = process.env.RENOVATE_TOKEN; } -if (process.env.RENOVATE_DEP_TYPES) { - config.depTypes = list(process.env.RENOVATE_DEP_TYPES); -} -if (process.env.RENOVATE_RECREATE_PRS) { - if (process.env.RENOVATE_RECREATE_PRS === 'true') { - config.recreatePrs = true; - } else if (process.env.RENOVATE_RECREATE_PRS === 'false') { - config.recreatePrs = false; - } else { - logger.error('RENOVATE_RECREATE_PRS must be true or false'); - process.exit(1); - } -} -if (process.env.RENOVATE_IGNORE_DEPS) { - config.ignoreDeps = list(process.env.RENOVATE_IGNORE_DEPS); -} -if (process.env.RENOVATE_LABELS) { - config.labels = list(process.env.RENOVATE_LABELS); -} -if (process.env.LOG_LEVEL) { - config.logLevel = process.env.LOG_LEVEL; +if (process.env.RENOVATE_REPOS) { + config.repositories = list(process.env.RENOVATE_REPOS); } if (process.env.RENOVATE_PACKAGE_FILES) { if (config.repositories) { @@ -39,8 +20,27 @@ if (process.env.RENOVATE_PACKAGE_FILES) { process.exit(1); } } -if (process.env.RENOVATE_TOKEN) { - config.token = process.env.RENOVATE_TOKEN; +if (process.env.RENOVATE_DEP_TYPES) { + config.depTypes = list(process.env.RENOVATE_DEP_TYPES); +} +if (process.env.RENOVATE_IGNORE_DEPS) { + config.ignoreDeps = list(process.env.RENOVATE_IGNORE_DEPS); +} +if (process.env.RENOVATE_LABELS) { + config.labels = list(process.env.RENOVATE_LABELS); +} +if (process.env.RENOVATE_RECREATE_PRS) { + if (process.env.RENOVATE_RECREATE_PRS === 'true') { + config.recreatePrs = true; + } else if (process.env.RENOVATE_RECREATE_PRS === 'false') { + config.recreatePrs = false; + } else { + logger.error('RENOVATE_RECREATE_PRS must be true or false'); + process.exit(1); + } +} +if (process.env.LOG_LEVEL) { + config.logLevel = process.env.LOG_LEVEL; } logger.debug(`Env config: ${JSON.stringify(config)}`);