Skip to content

Commit

Permalink
Adds other GK license key case
Browse files Browse the repository at this point in the history
  • Loading branch information
axosoft-ramint committed Sep 11, 2024
1 parent c5e292b commit 77462fc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/constants.storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,12 @@ export type StoredGKLicenseType =
| 'gitkraken_v1-teams'
| 'gitkraken_v1-hosted-enterprise'
| 'gitkraken_v1-self-hosted-enterprise'
| 'gitkraken_v1-standalone-enterprise';
| 'gitkraken_v1-standalone-enterprise'
| 'gitkraken-v1-pro'
| 'gitkraken-v1-teams'
| 'gitkraken-v1-hosted-enterprise'
| 'gitkraken-v1-self-hosted-enterprise'
| 'gitkraken-v1-standalone-enterprise';

export interface StoredOrganization {
id: string;
Expand Down
12 changes: 11 additions & 1 deletion src/plus/gk/checkin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ export type GKLicenseType =
| 'gitkraken_v1-teams'
| 'gitkraken_v1-hosted-enterprise'
| 'gitkraken_v1-self-hosted-enterprise'
| 'gitkraken_v1-standalone-enterprise';
| 'gitkraken_v1-standalone-enterprise'
| 'gitkraken-v1-pro'
| 'gitkraken-v1-teams'
| 'gitkraken-v1-hosted-enterprise'
| 'gitkraken-v1-self-hosted-enterprise'
| 'gitkraken-v1-standalone-enterprise';

export function getSubscriptionFromCheckIn(
data: GKCheckInResponse,
Expand Down Expand Up @@ -199,10 +204,12 @@ function convertLicenseTypeToPlanId(licenseType: GKLicenseType): SubscriptionPla
case 'gitlens-pro':
case 'bundle-pro':
case 'gitkraken_v1-pro':
case 'gitkraken-v1-pro':
return SubscriptionPlanId.Pro;
case 'gitlens-teams':
case 'bundle-teams':
case 'gitkraken_v1-teams':
case 'gitkraken-v1-teams':
return SubscriptionPlanId.Teams;
case 'gitlens-hosted-enterprise':
case 'gitlens-self-hosted-enterprise':
Expand All @@ -213,6 +220,9 @@ function convertLicenseTypeToPlanId(licenseType: GKLicenseType): SubscriptionPla
case 'gitkraken_v1-hosted-enterprise':
case 'gitkraken_v1-self-hosted-enterprise':
case 'gitkraken_v1-standalone-enterprise':
case 'gitkraken-v1-hosted-enterprise':
case 'gitkraken-v1-self-hosted-enterprise':
case 'gitkraken-v1-standalone-enterprise':
return SubscriptionPlanId.Enterprise;
default:
return SubscriptionPlanId.FreePlus;
Expand Down

0 comments on commit 77462fc

Please sign in to comment.