Skip to content

Commit 8d61774

Browse files
committed
Removes redundant 'source' query parameters
Cleans up GitKraken-related URLs by removing the `source=gitlens` query parameter from authentication, referral, and subscription management flows. This parameter is substituted by `getGkDevUrl()` automatically. (#4905, #4934)
1 parent 3806c28 commit 8d61774

3 files changed

Lines changed: 4 additions & 11 deletions

File tree

src/plus/gk/authenticationConnection.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,7 @@ export class AuthenticationConnection implements Disposable {
6363
}
6464

6565
@debug()
66-
async login(
67-
scopes: string[],
68-
scopeKey: string,
69-
signUp: boolean = false,
70-
context?: TrackingContext,
71-
): Promise<string> {
66+
async login(scopeKey: string, signUp: boolean = false, context?: TrackingContext): Promise<string> {
7267
const scope = getLogScope();
7368

7469
this.updateStatusBarItem(true);
@@ -84,7 +79,7 @@ export class AuthenticationConnection implements Disposable {
8479

8580
const url = await this.container.urls.getGkDevUrl(
8681
signUp ? 'register' : 'login',
87-
`${scopes.includes('gitlens') ? 'source=gitlens&' : ''}${
82+
`${
8883
context != null ? `context=${context}&` : ''
8984
}state=${encodeURIComponent(gkstate)}&redirect_uri=${encodeURIComponent(callbackUri.toString(true))}`,
9085
);

src/plus/gk/authenticationProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export class AccountAuthenticationProvider implements AuthenticationProvider, Di
9999
const token =
100100
options?.signIn != null
101101
? await this._authConnection.getTokenFromCodeAndState(options.signIn.code, options.signIn.state)
102-
: await this._authConnection.login(scopes, scopesKey, options?.signUp, options?.context);
102+
: await this._authConnection.login(scopesKey, options?.signUp, options?.context);
103103
const session = await this.createSessionForToken(token, scopes);
104104

105105
const sessions = await this._sessionsPromise;

src/plus/gk/subscriptionService.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ export class SubscriptionService implements Disposable {
735735
this.container.telemetry.sendEvent('subscription/action', { action: 'refer-friend' }, source);
736736
}
737737

738-
await openUrl(await this.container.urls.getGkDevUrl(undefined, 'referral_portal=true&source=gitlens'));
738+
await openUrl(await this.container.urls.getGkDevUrl(undefined, 'referral_portal=true'));
739739
}
740740

741741
@gate(() => '')
@@ -874,7 +874,6 @@ export class SubscriptionService implements Disposable {
874874
}
875875

876876
const query = new URLSearchParams();
877-
query.set('source', 'gitlens');
878877
query.set('product', 'gitlens');
879878
query.set('planType', getSubscriptionPlanType(plan));
880879

@@ -1679,7 +1678,6 @@ export class SubscriptionService implements Disposable {
16791678
const hasAccount = this._session != null;
16801679

16811680
const query = new URLSearchParams();
1682-
query.set('source', 'gitlens');
16831681
query.set('product', 'gitlens');
16841682

16851683
try {

0 commit comments

Comments
 (0)