Skip to content

Commit 6405c1f

Browse files
Supports planType on upgrade flow
1 parent b8d4abe commit 6405c1f

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/plus/gk/subscriptionService.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ export class SubscriptionService implements Disposable {
876876
}
877877

878878
@log()
879-
async upgrade(source: Source | undefined): Promise<void> {
879+
async upgrade(source: Source | undefined, plan?: SubscriptionPlanId): Promise<void> {
880880
const scope = getLogScope();
881881

882882
if (!(await ensurePlusFeaturesEnabled())) return;
@@ -919,6 +919,20 @@ export class SubscriptionService implements Disposable {
919919
query.set('source', 'gitlens');
920920
query.set('product', 'gitlens');
921921

922+
let planType = 'PRO';
923+
switch (plan) {
924+
case SubscriptionPlanId.Advanced:
925+
planType = 'ADVANCED';
926+
break;
927+
case SubscriptionPlanId.Teams:
928+
planType = 'TEAMS';
929+
break;
930+
case SubscriptionPlanId.Enterprise:
931+
planType = 'ENTERPRISE';
932+
break;
933+
}
934+
query.set('planType', planType);
935+
922936
if (promo?.code != null) {
923937
query.set('promoCode', promo.code);
924938
}

0 commit comments

Comments
 (0)