`Init: Bitbucket Cloud endpoint should generally be ${BITBUCKET_PROD_ENDPOINT} but is being configured to a different value. Did you mean to use Bitbucket Server?`
`Init: Bitbucket Cloud endpoint should generally be ${BITBUCKET_PROD_ENDPOINT} but is being configured to a different value. Did you mean to use Bitbucket Server?`
);
);
endpoint_=endpoint;
}
}
setBaseUrl(endpoint_);
// TODO: Add a connection check that endpoint/username/password combination are valid
// TODO: Add a connection check that endpoint/username/password combination are valid
constplatformConfig:PlatformConfig={
constplatformConfig:PlatformConfig={
endpoint:endpoint||BITBUCKET_PROD_ENDPOINT,
endpoint:endpoint||BITBUCKET_PROD_ENDPOINT,
...
@@ -83,14 +87,12 @@ export async function initRepo({
...
@@ -83,14 +87,12 @@ export async function initRepo({
localDir,
localDir,
optimizeForDisabled,
optimizeForDisabled,
bbUseDefaultReviewers,
bbUseDefaultReviewers,
endpoint=BITBUCKET_PROD_ENDPOINT,
}:RepoParams):Promise<RepoConfig>{
}:RepoParams):Promise<RepoConfig>{
logger.debug(`initRepo("${repository}")`);
logger.debug(`initRepo("${repository}")`);
constopts=hostRules.find({
constopts=hostRules.find({
hostType:PLATFORM_TYPE_BITBUCKET,
hostType:PLATFORM_TYPE_BITBUCKET,
url:endpoint,
url:endpoint_,
});
});
setBaseUrl(endpoint);
config={
config={
repository,
repository,
username:opts.username,
username:opts.username,
...
@@ -139,7 +141,7 @@ export async function initRepo({
...
@@ -139,7 +141,7 @@ export async function initRepo({
throwerr;
throwerr;
}
}
const{hostname}=URL.parse(endpoint);
const{hostname}=URL.parse(endpoint_);
// Converts API hostnames to their respective HTTP git hosts:
// Converts API hostnames to their respective HTTP git hosts: