Skip to content

Commit 132c211

Browse files
committed
Shows BitbucketServer PR on launchpad
(#4107, #4146)
1 parent 58cab56 commit 132c211

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

src/plus/integrations/providers/utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ export function getEntityIdentifierInput(entity: Issue | PullRequest | Launchpad
6262
if (entityType === EntityType.PullRequest && repoId == null) {
6363
throw new Error('Azure PRs must have a repository ID to be encoded');
6464
}
65-
} else if (provider === EntityIdentifierProviderType.Bitbucket) {
65+
} else if (
66+
provider === EntityIdentifierProviderType.Bitbucket ||
67+
provider === EntityIdentifierProviderType.BitbucketServer
68+
) {
6669
repoId = isLaunchpadItem(entity) ? entity.underlyingPullRequest?.repository.id : entity.repository?.id;
6770
}
6871

src/plus/launchpad/launchpad.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,6 +1596,7 @@ function getOpenOnGitProviderQuickInputButton(integrationId: string): QuickInput
15961596
case HostingIntegrationId.AzureDevOps:
15971597
return OpenOnAzureDevOpsQuickInputButton;
15981598
case HostingIntegrationId.Bitbucket:
1599+
case SelfHostedIntegrationId.BitbucketServer:
15991600
return OpenOnBitbucketQuickInputButton;
16001601
default:
16011602
return undefined;
@@ -1621,6 +1622,8 @@ function getIntegrationTitle(integrationId: string): string {
16211622
return 'Azure DevOps';
16221623
case HostingIntegrationId.Bitbucket:
16231624
return 'Bitbucket';
1625+
case SelfHostedIntegrationId.BitbucketServer:
1626+
return 'Bitbucket Data Center';
16241627
default:
16251628
return integrationId;
16261629
}

src/plus/launchpad/launchpadProvider.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ export const supportedLaunchpadIntegrations: (HostingIntegrationId | CloudSelfHo
134134
SelfHostedIntegrationId.CloudGitLabSelfHosted,
135135
HostingIntegrationId.AzureDevOps,
136136
HostingIntegrationId.Bitbucket,
137+
SelfHostedIntegrationId.BitbucketServer,
137138
];
138139
type SupportedLaunchpadIntegrationIds = (typeof supportedLaunchpadIntegrations)[number];
139140
function isSupportedLaunchpadIntegrationId(id: string): id is SupportedLaunchpadIntegrationIds {

0 commit comments

Comments
 (0)