Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesigns Home account footer into new header bar #3861

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 37 additions & 4 deletions src/constants.integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,44 @@ export enum IssueIntegrationId {

export type IntegrationId = HostingIntegrationId | IssueIntegrationId | SelfHostedIntegrationId;

export const supportedCloudIntegrationIds = [IssueIntegrationId.Jira];
export const supportedCloudIntegrationIdsExperimental = [
IssueIntegrationId.Jira,
export const supportedOrderedCloudIssueIntegrationIds = [IssueIntegrationId.Jira];
export const supportedOrderedCloudIntegrationIds = [
HostingIntegrationId.GitHub,
HostingIntegrationId.GitLab,
IssueIntegrationId.Jira,
];

export type SupportedCloudIntegrationIds = (typeof supportedCloudIntegrationIdsExperimental)[number];
export type SupportedCloudIntegrationIds = (typeof supportedOrderedCloudIntegrationIds)[number];

export function isSupportedCloudIntegrationId(id: IntegrationId): id is SupportedCloudIntegrationIds {
return supportedOrderedCloudIntegrationIds.includes(id as SupportedCloudIntegrationIds);
}

export type IntegrationFeatures = 'prs' | 'issues';

export interface IntegrationDescriptor {
id: SupportedCloudIntegrationIds;
name: string;
icon: string;
supports: IntegrationFeatures[];
}
export const supportedCloudIntegrationDescriptors: IntegrationDescriptor[] = [
{
id: HostingIntegrationId.GitHub,
name: 'GitHub',
icon: 'gl-provider-github',
supports: ['prs', 'issues'],
},
{
id: HostingIntegrationId.GitLab,
name: 'GitLab',
icon: 'gl-provider-gitlab',
supports: ['prs', 'issues'],
},
{
id: IssueIntegrationId.Jira,
name: 'Jira',
icon: 'gl-provider-jira',
supports: ['issues'],
},
];
5 changes: 3 additions & 2 deletions src/plus/gk/account/__debug__accountDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class AccountDebug {

this.service.restoreFeaturePreviews();
this.service.restoreSession();
this.service.changeSubscription(this.service.getStoredSubscription(), { store: false });
this.service.changeSubscription(this.service.getStoredSubscription(), undefined, { store: false });
}

private async startSimulation(pick: SimulateQuickPickItem | undefined): Promise<boolean> {
Expand Down Expand Up @@ -287,6 +287,7 @@ class AccountDebug {
state === SubscriptionState.Community
? undefined
: getPreviewSubscription(state === SubscriptionState.ProPreviewExpired ? 0 : 3),
undefined,
{ store: false },
);

Expand Down Expand Up @@ -341,7 +342,7 @@ class AccountDebug {
activeOrganizationId,
);

this.service.changeSubscription({ ...subscription, ...simulatedSubscription }, { store: false });
this.service.changeSubscription({ ...subscription, ...simulatedSubscription }, undefined, { store: false });

return false;
}
Expand Down
Loading
Loading