Browse Source

Removes deprecated auth

main
Eric Amodio 2 years ago
parent
commit
ef93c20617
2 changed files with 11 additions and 2 deletions
  1. +1
    -0
      src/constants.ts
  2. +10
    -2
      src/extension.ts

+ 1
- 0
src/constants.ts View File

@ -289,6 +289,7 @@ export const enum CoreCommands {
ShowExplorer = 'workbench.view.explorer', ShowExplorer = 'workbench.view.explorer',
ShowReferences = 'editor.action.showReferences', ShowReferences = 'editor.action.showReferences',
ShowSCM = 'workbench.view.scm', ShowSCM = 'workbench.view.scm',
UninstallExtension = 'workbench.extensions.uninstallExtension',
} }
export const enum CoreGitCommands { export const enum CoreGitCommands {

+ 10
- 2
src/extension.ts View File

@ -4,7 +4,7 @@ import { Api } from './api/api';
import type { CreatePullRequestActionContext, GitLensApi, OpenPullRequestActionContext } from './api/gitlens'; import type { CreatePullRequestActionContext, GitLensApi, OpenPullRequestActionContext } from './api/gitlens';
import type { CreatePullRequestOnRemoteCommandArgs, OpenPullRequestOnRemoteCommandArgs } from './commands'; import type { CreatePullRequestOnRemoteCommandArgs, OpenPullRequestOnRemoteCommandArgs } from './commands';
import { configuration, Configuration, OutputLevel } from './configuration'; import { configuration, Configuration, OutputLevel } from './configuration';
import { Commands, ContextKeys } from './constants';
import { Commands, ContextKeys, CoreCommands } from './constants';
import { Container } from './container'; import { Container } from './container';
import { setContext } from './context'; import { setContext } from './context';
import { GitUri } from './git/gitUri'; import { GitUri } from './git/gitUri';
@ -13,7 +13,7 @@ import { Logger, LogLevel } from './logger';
import { Messages } from './messages'; import { Messages } from './messages';
import { registerPartnerActionRunners } from './partners'; import { registerPartnerActionRunners } from './partners';
import { StorageKeys, SyncedStorageKeys } from './storage'; import { StorageKeys, SyncedStorageKeys } from './storage';
import { executeCommand, registerCommands } from './system/command';
import { executeCommand, executeCoreCommand, registerCommands } from './system/command';
import { setDefaultDateLocales } from './system/date'; import { setDefaultDateLocales } from './system/date';
import { once } from './system/event'; import { once } from './system/event';
import { Stopwatch } from './system/stopwatch'; import { Stopwatch } from './system/stopwatch';
@ -149,6 +149,8 @@ export async function activate(context: ExtensionContext): Promise
}`, }`,
}); });
setTimeout(() => uninstallDeprecatedAuthentication(), 30000);
const api = new Api(container); const api = new Api(container);
return Promise.resolve(api); return Promise.resolve(api);
} }
@ -285,3 +287,9 @@ async function showWelcomeOrWhatsNew(container: Container, version: string, prev
} }
} }
} }
function uninstallDeprecatedAuthentication() {
if (extensions.getExtension('gitkraken.gitkraken-authentication') == null) return;
void executeCoreCommand(CoreCommands.UninstallExtension, 'gitkraken.gitkraken-authentication');
}

Loading…
Cancel
Save