Skip to content

Commit 951d0b1

Browse files
committed
Merge remote-tracking branch 'origin/main' into koesie10/deprecate-lgtm-download
2 parents 2989e4c + edcac69 commit 951d0b1

File tree

3 files changed

+11
-21
lines changed

3 files changed

+11
-21
lines changed

extensions/ql-vscode/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## [UNRELEASED]
44

5+
- Add ability for users to download databases directly from GitHub. [#1466](https://github.com/github/vscode-codeql/pull/1466)
56
- Remove ability to download databases from LGTM. [#1467](https://github.com/github/vscode-codeql/pull/1467)
67

78
## 1.6.10 - 9 August 2022

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": "codeQL.chooseDatabaseLgtm",
935927
"when": "config.codeQL.canary"
@@ -1179,7 +1171,7 @@
11791171
},
11801172
{
11811173
"view": "codeQLDatabases",
1182-
"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)"
1174+
"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)"
11831175
},
11841176
{
11851177
"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)