@@ -13,8 +13,9 @@ import { log } from '../../../system/decorators/log';
1313import { ensurePaidPlan } from '../../gk/utils/-webview/plus.utils' ;
1414import type { IntegrationAuthenticationProviderDescriptor } from '../authentication/integrationAuthenticationProvider' ;
1515import type { IntegrationAuthenticationService } from '../authentication/integrationAuthenticationService' ;
16- import type { RepositoryDescriptor , SupportedIntegrationIds } from '../integration' ;
16+ import type { RepositoryDescriptor } from '../integration' ;
1717import { HostingIntegration } from '../integration' ;
18+ import type { GitHubRelatedIntegrationIds } from './github/github.utils' ;
1819import { getGitHubPullRequestIdentityFromMaybeUrl } from './github/github.utils' ;
1920import { providersMetadata } from './models' ;
2021import type { ProvidersApi } from './providersApi' ;
@@ -38,7 +39,7 @@ const cloudEnterpriseAuthProvider: IntegrationAuthenticationProviderDescriptor =
3839
3940export type GitHubRepositoryDescriptor = RepositoryDescriptor ;
4041
41- abstract class GitHubIntegrationBase < ID extends SupportedIntegrationIds > extends HostingIntegration <
42+ abstract class GitHubIntegrationBase < ID extends GitHubRelatedIntegrationIds > extends HostingIntegration <
4243 ID ,
4344 GitHubRepositoryDescriptor
4445> {
@@ -260,6 +261,16 @@ abstract class GitHubIntegrationBase<ID extends SupportedIntegrationIds> extends
260261 baseUrl : this . apiBaseUrl ,
261262 } ) ;
262263 }
264+
265+ protected override getProviderPullRequestIdentityFromMaybeUrl ( search : string ) : PullRequestUrlIdentity | undefined {
266+ const identity = getGitHubPullRequestIdentityFromMaybeUrl ( search ) ;
267+ if ( identity == null ) return undefined ;
268+
269+ return {
270+ ...identity ,
271+ provider : this . id ,
272+ } ;
273+ }
263274}
264275
265276export class GitHubIntegration extends GitHubIntegrationBase < HostingIntegrationId . GitHub > {
@@ -294,10 +305,6 @@ export class GitHubIntegration extends GitHubIntegrationBase<HostingIntegrationI
294305 super . refresh ( ) ;
295306 }
296307 }
297-
298- protected override getProviderPullRequestIdentityFromMaybeUrl ( search : string ) : PullRequestUrlIdentity | undefined {
299- return getGitHubPullRequestIdentityFromMaybeUrl ( search ) ;
300- }
301308}
302309
303310export class GitHubEnterpriseIntegration extends GitHubIntegrationBase <
0 commit comments