@@ -17,11 +17,44 @@ export enum IssueIntegrationId {
17
17
18
18
export type IntegrationId = HostingIntegrationId | IssueIntegrationId | SelfHostedIntegrationId ;
19
19
20
- export const supportedCloudIntegrationIds = [ IssueIntegrationId . Jira ] ;
21
- export const supportedCloudIntegrationIdsExperimental = [
22
- IssueIntegrationId . Jira ,
20
+ export const supportedOrderedCloudIssueIntegrationIds = [ IssueIntegrationId . Jira ] ;
21
+ export const supportedOrderedCloudIntegrationIds = [
23
22
HostingIntegrationId . GitHub ,
24
23
HostingIntegrationId . GitLab ,
24
+ IssueIntegrationId . Jira ,
25
25
] ;
26
26
27
- export type SupportedCloudIntegrationIds = ( typeof supportedCloudIntegrationIdsExperimental ) [ number ] ;
27
+ export type SupportedCloudIntegrationIds = ( typeof supportedOrderedCloudIntegrationIds ) [ number ] ;
28
+
29
+ export function isSupportedCloudIntegrationId ( id : IntegrationId ) : id is SupportedCloudIntegrationIds {
30
+ return supportedOrderedCloudIntegrationIds . includes ( id as SupportedCloudIntegrationIds ) ;
31
+ }
32
+
33
+ export type IntegrationFeatures = 'prs' | 'issues' ;
34
+
35
+ export interface IntegrationDescriptor {
36
+ id : SupportedCloudIntegrationIds ;
37
+ name : string ;
38
+ icon : string ;
39
+ supports : IntegrationFeatures [ ] ;
40
+ }
41
+ export const supportedCloudIntegrationDescriptors : IntegrationDescriptor [ ] = [
42
+ {
43
+ id : HostingIntegrationId . GitHub ,
44
+ name : 'GitHub' ,
45
+ icon : 'gl-provider-github' ,
46
+ supports : [ 'prs' , 'issues' ] ,
47
+ } ,
48
+ {
49
+ id : HostingIntegrationId . GitLab ,
50
+ name : 'GitLab' ,
51
+ icon : 'gl-provider-gitlab' ,
52
+ supports : [ 'prs' , 'issues' ] ,
53
+ } ,
54
+ {
55
+ id : IssueIntegrationId . Jira ,
56
+ name : 'Jira' ,
57
+ icon : 'gl-provider-jira' ,
58
+ supports : [ 'issues' ] ,
59
+ } ,
60
+ ] ;
0 commit comments