Skip to content
Snippets Groups Projects
Unverified Commit 2d99e767 authored by Rhys Arkins's avatar Rhys Arkins Committed by GitHub
Browse files

fix(platform): put typed platform rule first (#11722)

parent 0decf99b
No related merge requests found
......@@ -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',
......
......@@ -65,13 +65,13 @@ export async function initPlatform(config: AllConfig): Promise<AllConfig> {
}
});
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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment