Skip to content

Commit 41cb644

Browse files
committed
Show BitbucketServer PR on launchpad
(#4107)
1 parent e673ab2 commit 41cb644

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
@@ -1597,6 +1597,7 @@ function getOpenOnGitProviderQuickInputButton(integrationId: string): QuickInput
15971597
case HostingIntegrationId.AzureDevOps:
15981598
return OpenOnAzureDevOpsQuickInputButton;
15991599
case HostingIntegrationId.Bitbucket:
1600+
case SelfHostedIntegrationId.BitbucketServer:
16001601
return OpenOnBitbucketQuickInputButton;
16011602
default:
16021603
return undefined;
@@ -1622,6 +1623,8 @@ function getIntegrationTitle(integrationId: string): string {
16221623
return 'Azure DevOps';
16231624
case HostingIntegrationId.Bitbucket:
16241625
return 'Bitbucket';
1626+
case SelfHostedIntegrationId.BitbucketServer:
1627+
return 'Bitbucket Data Center';
16251628
default:
16261629
return integrationId;
16271630
}

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)