Skip to content

Commit 95438bb

Browse files
committed
Remove canary requirement for GitHub database download
1 parent 6d7d0ca commit 95438bb

File tree

2 files changed

+10
-21
lines changed

2 files changed

+10
-21
lines changed

extensions/ql-vscode/package.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@
664664
},
665665
{
666666
"command": "codeQLDatabases.chooseDatabaseGithub",
667-
"when": "config.codeQL.canary && view == codeQLDatabases",
667+
"when": "view == codeQLDatabases",
668668
"group": "navigation"
669669
},
670670
{
@@ -878,10 +878,6 @@
878878
}
879879
],
880880
"commandPalette": [
881-
{
882-
"command": "codeQL.authenticateToGitHub",
883-
"when": "config.codeQL.canary"
884-
},
885881
{
886882
"command": "codeQL.runQuery",
887883
"when": "resourceLangId == ql && resourceExtname == .ql"
@@ -926,10 +922,6 @@
926922
"command": "codeQL.viewCfg",
927923
"when": "resourceScheme == codeql-zip-archive && config.codeQL.canary"
928924
},
929-
{
930-
"command": "codeQL.chooseDatabaseGithub",
931-
"when": "config.codeQL.canary"
932-
},
933925
{
934926
"command": "codeQLDatabases.setCurrentDatabase",
935927
"when": "false"
@@ -1175,7 +1167,7 @@
11751167
},
11761168
{
11771169
"view": "codeQLDatabases",
1178-
"contents": "Add a CodeQL database:\n[From a folder](command:codeQLDatabases.chooseDatabaseFolder)\n[From an archive](command:codeQLDatabases.chooseDatabaseArchive)\n[From a URL (as a zip file)](command:codeQLDatabases.chooseDatabaseInternet)\n[From LGTM](command:codeQLDatabases.chooseDatabaseLgtm)"
1170+
"contents": "Add a CodeQL database:\n[From a folder](command:codeQLDatabases.chooseDatabaseFolder)\n[From an archive](command:codeQLDatabases.chooseDatabaseArchive)\n[From a URL (as a zip file)](command:codeQLDatabases.chooseDatabaseInternet)\n[From GitHub](command:codeQLDatabases.chooseDatabaseGithub)\n[From LGTM](command:codeQLDatabases.chooseDatabaseLgtm)"
11791171
},
11801172
{
11811173
"view": "codeQLEvalLogViewer",

extensions/ql-vscode/src/extension.ts

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,19 +1018,16 @@ async function activateWithInstalledDistribution(
10181018
}
10191019
};
10201020

1021-
// The "authenticateToGitHub" command is internal-only.
10221021
ctx.subscriptions.push(
10231022
commandRunner('codeQL.authenticateToGitHub', async () => {
1024-
if (isCanary()) {
1025-
/**
1026-
* Credentials for authenticating to GitHub.
1027-
* These are used when making API calls.
1028-
*/
1029-
const credentials = await Credentials.initialize(ctx);
1030-
const octokit = await credentials.getOctokit();
1031-
const userInfo = await octokit.users.getAuthenticated();
1032-
void showAndLogInformationMessage(`Authenticated to GitHub as user: ${userInfo.data.login}`);
1033-
}
1023+
/**
1024+
* Credentials for authenticating to GitHub.
1025+
* These are used when making API calls.
1026+
*/
1027+
const credentials = await Credentials.initialize(ctx);
1028+
const octokit = await credentials.getOctokit();
1029+
const userInfo = await octokit.users.getAuthenticated();
1030+
void showAndLogInformationMessage(`Authenticated to GitHub as user: ${userInfo.data.login}`);
10341031
}));
10351032

10361033
ctx.subscriptions.push(

0 commit comments

Comments
 (0)