From d8386f780a6c60371c5e213584e14683482930f2 Mon Sep 17 00:00:00 2001 From: Manoj - Date: Wed, 3 Feb 2021 16:54:44 +1100 Subject: [PATCH] added condition handling the case - bitbucket.org --- packages/integration/src/bitbucket/core.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/integration/src/bitbucket/core.ts b/packages/integration/src/bitbucket/core.ts index f22c727f63..4359762676 100644 --- a/packages/integration/src/bitbucket/core.ts +++ b/packages/integration/src/bitbucket/core.ts @@ -38,7 +38,7 @@ export async function getBitbucketDefaultBranch( var response = await fetch(branchUrl, getBitbucketRequestOptions(config)); - if (response.status === 404) { + if (response.status === 404 && !isHosted) { // First try the new format, and then if it gets specifically a 404 it should try the old format // (to support old Atlassian Bitbucket v5.11.1 format ) branchUrl = `${config.apiBaseUrl}/projects/${project}/repos/${repoName}/branches/default`;