Skip to content

Commit

Permalink
logs: global env hostRules
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Sep 17, 2021
1 parent 022206c commit 7b3e14c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/workers/global/config/parse/env.ts
Expand Up @@ -80,6 +80,7 @@ export function getConfig(env: NodeJS.ProcessEnv): AllConfig {
});

if (env.GITHUB_COM_TOKEN) {
logger.debug(`Converting GITHUB_COM_TOKEN into a global host rule`);
config.hostRules.push({
hostType: PLATFORM_TYPE_GITHUB,
matchHost: 'github.com',
Expand Down Expand Up @@ -119,6 +120,7 @@ export function getConfig(env: NodeJS.ProcessEnv): AllConfig {
const existingRule = hostRules.find(
(hr) => hr.hostType === hostType && hr.matchHost === matchHost
);
logger.debug(`Converting ${envName} into a global host rule`);
if (existingRule) {
// Add current field to existing rule
existingRule[suffix] = env[envName];
Expand Down

0 comments on commit 7b3e14c

Please sign in to comment.