Skip to content

Commit

Permalink
fix(platform/github): sort config hostRules before platform (#25135)
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Oct 11, 2023
1 parent f31c088 commit b7d1f0f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions lib/modules/platform/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,18 @@ describe('modules/platform/index', () => {
endpoint: 'https://api.github.com/',
gitAuthor: 'user@domain.com',
hostRules: [
{
hostType: 'github',
matchHost: 'github.com',
token: '456',
username: 'def',
},
{
hostType: 'docker',
matchHost: 'ghcr.io',
password: '123',
username: 'USERNAME',
},
{
hostType: 'github',
matchHost: 'github.com',
token: '456',
username: 'def',
},
{
hostType: 'github',
matchHost: 'api.github.com',
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/platform/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export async function initPlatform(config: AllConfig): Promise<AllConfig> {
...config,
...platformInfo,
hostRules: [
...(config.hostRules ?? []),
...(platformInfo?.hostRules ?? []),
...(config.hostRules ?? []),
],
};
// istanbul ignore else
Expand Down

0 comments on commit b7d1f0f

Please sign in to comment.