diff --git a/lib/platform/index.spec.ts b/lib/platform/index.spec.ts index 790180605afb67..ef366e3a2bc436 100644 --- a/lib/platform/index.spec.ts +++ b/lib/platform/index.spec.ts @@ -61,12 +61,12 @@ describe('platform/index', () => { gitAuthor: 'user@domain.com', hostRules: [ { + hostType: 'bitbucket', matchHost: 'api.bitbucket.org', password: '123', username: 'abc', }, { - hostType: 'bitbucket', matchHost: 'api.bitbucket.org', password: '123', username: 'abc', diff --git a/lib/platform/index.ts b/lib/platform/index.ts index c99763c5279f90..f86e7382c2da43 100644 --- a/lib/platform/index.ts +++ b/lib/platform/index.ts @@ -65,13 +65,13 @@ export async function initPlatform(config: AllConfig): Promise { } }); returnConfig.hostRules = returnConfig.hostRules || []; - returnConfig.hostRules.push(platformRule); - hostRules.add(platformRule); const typedPlatformRule = { ...platformRule, hostType: returnConfig.platform, }; returnConfig.hostRules.push(typedPlatformRule); hostRules.add(typedPlatformRule); + returnConfig.hostRules.push(platformRule); + hostRules.add(platformRule); return returnConfig; }