fix: fix Bitbucket authenticated URL

This commit is contained in:
pvdlg 2018-04-30 17:12:35 -04:00 committed by Pierre Vanduynslager
parent a52f258fa4
commit e88ac6300c

View File

@ -44,7 +44,7 @@ module.exports = async ({repositoryUrl, branch}) => {
const protocol = protocols.includes('https') ? 'https' : protocols.includes('http') ? 'http' : 'https';
// If credentials are set via anvironment variables, convert the URL to http/https and add basic auth, otherwise return `repositoryUrl` as is
return gitCredentials ? {...parsed, ...{token: gitCredentials}}.toString(protocol) : repositoryUrl;
return gitCredentials ? {...parsed, protocols: [protocol], user: gitCredentials}.toString(protocol) : repositoryUrl;
}
return repositoryUrl;
};