Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
Revert "Add vscode github built-in plugin as a default plugin" (eclip…
Browse files Browse the repository at this point in the history
…se-che#900)

This reverts commit 666e14a.
  • Loading branch information
vinokurig authored and monaka committed Nov 6, 2020
1 parent 13e13ed commit 7c49243
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 40 deletions.
22 changes: 10 additions & 12 deletions generator/src/templates/theiaPlugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,14 @@
"vscode-editorconfig": "https://open-vsx.org/api/EditorConfig/EditorConfig/0.14.4/file/EditorConfig.EditorConfig-0.14.4.vsix",
"vscode-eslint": "https://open-vsx.org/api/dbaeumer/vscode-eslint/2.1.1/file/dbaeumer.vscode-eslint-2.1.1.vsix",
"vscode-git": "https://open-vsx.org/api/vscode/git/1.49.3/file/vscode.git-1.49.3.vsix",
"vscode-references-view": "https://open-vsx.org/api/ms-vscode/references-view/0.0.47/file/ms-vscode.references-view-0.0.47.vsix",
"vscode-builtin-icon-theme-seti": "https://open-vsx.org/api/vscode/vscode-theme-seti/1.44.2/file/vscode.vscode-theme-seti-1.44.2.vsix",
"vscode-builtin-theme-abyss": "https://open-vsx.org/api/vscode/theme-abyss/1.44.2/file/vscode.theme-abyss-1.44.2.vsix",
"vscode-builtin-theme-defaults": "https://open-vsx.org/api/vscode/theme-defaults/1.44.2/file/vscode.theme-defaults-1.44.2.vsix",
"vscode-builtin-theme-kimbie-dark": "https://open-vsx.org/api/vscode/theme-kimbie-dark/1.44.2/file/vscode.theme-kimbie-dark-1.44.2.vsix",
"vscode-builtin-theme-monokai": "https://open-vsx.org/api/vscode/theme-monokai/1.44.2/file/vscode.theme-monokai-1.44.2.vsix",
"vscode-builtin-theme-monokai-dimmed": "https://open-vsx.org/api/vscode/theme-monokai-dimmed/1.44.2/file/vscode.theme-monokai-dimmed-1.44.2.vsix",
"vscode-builtin-theme-quietlight": "https://open-vsx.org/api/vscode/theme-quietlight/1.44.2/file/vscode.theme-quietlight-1.44.2.vsix",
"vscode-builtin-theme-red": "https://open-vsx.org/api/vscode/theme-red/1.44.2/file/vscode.theme-red-1.44.2.vsix",
"vscode-builtin-theme-solarized-dark": "https://open-vsx.org/api/vscode/theme-solarized-dark/1.44.2/file/vscode.theme-solarized-dark-1.44.2.vsix",
"vscode-builtin-theme-solarized-light": "https://open-vsx.org/api/vscode/theme-solarized-light/1.44.2/file/vscode.theme-solarized-light-1.44.2.vsix",
"vscode-builtin-theme-tomorrow-night-blue": "https://open-vsx.org/api/vscode/theme-tomorrow-night-blue/1.44.2/file/vscode.theme-tomorrow-night-blue-1.44.2.vsix"
"vscode-references-view": "https://github.com/theia-ide/vscode-references-view/releases/download/v0.0.47/references-view-0.0.47.vsix",
"vscode-builtin-theme-abyss": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-abyss-1.39.1-prel.vsix",
"vscode-builtin-theme-defaults": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-defaults-1.39.1-prel.vsix",
"vscode-builtin-theme-kimbie-dark": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-kimbie-dark-1.39.1-prel.vsix",
"vscode-builtin-theme-monokai": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-monokai-1.39.1-prel.vsix",
"vscode-builtin-theme-dimmed": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-monokai-dimmed-1.39.1-prel.vsix",
"vscode-builtin-theme-quietlight": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-quietlight-1.39.1-prel.vsix",
"vscode-builtin-theme-red": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-red-1.39.1-prel.vsix",
"vscode-builtin-theme-solarized-dark": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-solarized-dark-1.39.1-prel.vsix",
"vscode-builtin-theme-tomorrow-night-blue": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-tomorrow-night-blue-1.39.1-prel.vsix"
}
56 changes: 28 additions & 28 deletions plugins/github-auth-plugin/src/github-auth-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,39 @@ export async function start(context: theia.PluginContext): Promise<void> {
let session: theia.AuthenticationSession | undefined = context.workspaceState.get('session');
const onDidChangeSessions = new theia.EventEmitter<theia.AuthenticationProviderAuthenticationSessionsChangeEvent>();
theia.authentication.registerAuthenticationProvider({
id: 'github',
label: 'GitHub',
supportsMultipleAccounts: false,
onDidChangeSessions: onDidChangeSessions.event,
getSessions: async () => {
if (session) {
return [session];
} else {
return [];
id: 'github',
label: 'GitHub',
supportsMultipleAccounts: false,
onDidChangeSessions: onDidChangeSessions.event,
getSessions: async () => {
if (session) {
return [session];
} else {
return [];
}
},
login: async (scopes: string[]) => {
const githubUser = await che.github.getUser();
session = {
id: 'github-session',
accessToken: await che.github.getToken(),
account: {label: githubUser.login, id: githubUser.id.toString()},
scopes
};
context.workspaceState.update('session', session);
onDidChangeSessions.fire({ added: [session.id], removed: [], changed: [] });
return session;
},
logout: async (id: string) => {
session = undefined;
context.workspaceState.update('session', session);
onDidChangeSessions.fire({ added: [], removed: [id], changed: [] });
}
},
login: async (scopes: string[]) => {
const githubUser = await che.github.getUser();
session = {
id: 'github-session',
accessToken: await che.github.getToken(),
account: { label: githubUser.login, id: githubUser.id.toString() },
scopes
};
context.workspaceState.update('session', session);
onDidChangeSessions.fire({ added: [session.id], removed: [], changed: [] });
return session;
},
logout: async (id: string) => {
session = undefined;
context.workspaceState.update('session', session);
onDidChangeSessions.fire({ added: [], removed: [id], changed: [] });
}
}
);
if (session) {
onDidChangeSessions.fire({ added: [session.id], removed: [], changed: [] });
// TODO Remove the notification when https://github.com/eclipse-theia/theia/issues/7178 is fixed.
// TODO Remove the notification when https://github.com/eclipse-theia/theia/issues/7178 is fixed.
} else {
const signIn = 'Sign in';
const result = await theia.window.showInformationMessage(
Expand Down

0 comments on commit 7c49243

Please sign in to comment.