fix(config): apply secrets to global hostRules (#16217)

* fix(config): apply secrets to global hostRules

Closes #16215

* fix import ordering

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
This commit is contained in:
Rhys Arkins 2022-06-24 10:21:08 +02:00 committed by GitHub
parent 9c51ff6733
commit 54c35dbbd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,7 @@
import os from 'os';
import fs from 'fs-extra';
import upath from 'upath';
import { applySecretsToConfig } from '../../config/secrets';
import type { AllConfig, RenovateConfig } from '../../config/types';
import { logger } from '../../logger';
import { initPlatform } from '../../modules/platform';
@ -46,6 +47,7 @@ async function checkVersions(): Promise<void> {
function setGlobalHostRules(config: RenovateConfig): void {
if (config.hostRules) {
logger.debug('Setting global hostRules');
applySecretsToConfig(config, undefined, false);
config.hostRules.forEach((rule) => hostRules.add(rule));
}
}