diff --git a/lib/modules/platform/index.spec.ts b/lib/modules/platform/index.spec.ts index e5f090b011e448..8c85df4db67d55 100644 --- a/lib/modules/platform/index.spec.ts +++ b/lib/modules/platform/index.spec.ts @@ -70,7 +70,6 @@ describe('modules/platform/index', () => { { hostType: 'bitbucket', matchHost: 'api.bitbucket.org', - resolvedHost: 'api.bitbucket.org', password: '123', username: 'abc', }, diff --git a/lib/util/host-rules.ts b/lib/util/host-rules.ts index ed865d78a4c543..c7acec49a1089f 100644 --- a/lib/util/host-rules.ts +++ b/lib/util/host-rules.ts @@ -9,7 +9,8 @@ import { parseUrl, validateUrl } from './url'; let hostRules: HostRule[] = []; -export function add(rule: HostRule): void { +export function add(params: HostRule): void { + const rule = clone(params); const confidentialFields: (keyof HostRule)[] = ['password', 'token']; if (rule.matchHost) { const parsedUrl = parseUrl(rule.matchHost);