@@ -13,8 +13,9 @@ import { log } from '../../../system/decorators/log';
13
13
import { ensurePaidPlan } from '../../gk/utils/-webview/plus.utils' ;
14
14
import type { IntegrationAuthenticationProviderDescriptor } from '../authentication/integrationAuthenticationProvider' ;
15
15
import type { IntegrationAuthenticationService } from '../authentication/integrationAuthenticationService' ;
16
- import type { RepositoryDescriptor , SupportedIntegrationIds } from '../integration' ;
16
+ import type { RepositoryDescriptor } from '../integration' ;
17
17
import { HostingIntegration } from '../integration' ;
18
+ import type { GitHubRelatedIntegrationIds } from './github/github.utils' ;
18
19
import { getGitHubPullRequestIdentityFromMaybeUrl } from './github/github.utils' ;
19
20
import { providersMetadata } from './models' ;
20
21
import type { ProvidersApi } from './providersApi' ;
@@ -38,7 +39,7 @@ const cloudEnterpriseAuthProvider: IntegrationAuthenticationProviderDescriptor =
38
39
39
40
export type GitHubRepositoryDescriptor = RepositoryDescriptor ;
40
41
41
- abstract class GitHubIntegrationBase < ID extends SupportedIntegrationIds > extends HostingIntegration <
42
+ abstract class GitHubIntegrationBase < ID extends GitHubRelatedIntegrationIds > extends HostingIntegration <
42
43
ID ,
43
44
GitHubRepositoryDescriptor
44
45
> {
@@ -260,6 +261,16 @@ abstract class GitHubIntegrationBase<ID extends SupportedIntegrationIds> extends
260
261
baseUrl : this . apiBaseUrl ,
261
262
} ) ;
262
263
}
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
+ }
263
274
}
264
275
265
276
export class GitHubIntegration extends GitHubIntegrationBase < HostingIntegrationId . GitHub > {
@@ -294,10 +305,6 @@ export class GitHubIntegration extends GitHubIntegrationBase<HostingIntegrationI
294
305
super . refresh ( ) ;
295
306
}
296
307
}
297
-
298
- protected override getProviderPullRequestIdentityFromMaybeUrl ( search : string ) : PullRequestUrlIdentity | undefined {
299
- return getGitHubPullRequestIdentityFromMaybeUrl ( search ) ;
300
- }
301
308
}
302
309
303
310
export class GitHubEnterpriseIntegration extends GitHubIntegrationBase <
0 commit comments