Merge remote-tracking branch 'origin/main' into koesie10/deprecate-lgtm-download

This commit is contained in:
Koen Vlaswinkel
2022-08-23 16:27:23 +02:00
3 changed files with 11 additions and 21 deletions

View File

@@ -2,6 +2,7 @@
## [UNRELEASED] ## [UNRELEASED]
- Add ability for users to download databases directly from GitHub. [#1466](https://github.com/github/vscode-codeql/pull/1466)
- Remove ability to download databases from LGTM. [#1467](https://github.com/github/vscode-codeql/pull/1467) - Remove ability to download databases from LGTM. [#1467](https://github.com/github/vscode-codeql/pull/1467)
## 1.6.10 - 9 August 2022 ## 1.6.10 - 9 August 2022

View File

@@ -664,7 +664,7 @@
}, },
{ {
"command": "codeQLDatabases.chooseDatabaseGithub", "command": "codeQLDatabases.chooseDatabaseGithub",
"when": "config.codeQL.canary && view == codeQLDatabases", "when": "view == codeQLDatabases",
"group": "navigation" "group": "navigation"
}, },
{ {
@@ -878,10 +878,6 @@
} }
], ],
"commandPalette": [ "commandPalette": [
{
"command": "codeQL.authenticateToGitHub",
"when": "config.codeQL.canary"
},
{ {
"command": "codeQL.runQuery", "command": "codeQL.runQuery",
"when": "resourceLangId == ql && resourceExtname == .ql" "when": "resourceLangId == ql && resourceExtname == .ql"
@@ -926,10 +922,6 @@
"command": "codeQL.viewCfg", "command": "codeQL.viewCfg",
"when": "resourceScheme == codeql-zip-archive && config.codeQL.canary" "when": "resourceScheme == codeql-zip-archive && config.codeQL.canary"
}, },
{
"command": "codeQL.chooseDatabaseGithub",
"when": "config.codeQL.canary"
},
{ {
"command": "codeQL.chooseDatabaseLgtm", "command": "codeQL.chooseDatabaseLgtm",
"when": "config.codeQL.canary" "when": "config.codeQL.canary"
@@ -1179,7 +1171,7 @@
}, },
{ {
"view": "codeQLDatabases", "view": "codeQLDatabases",
"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)" "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)"
}, },
{ {
"view": "codeQLEvalLogViewer", "view": "codeQLEvalLogViewer",

View File

@@ -1018,19 +1018,16 @@ async function activateWithInstalledDistribution(
} }
}; };
// The "authenticateToGitHub" command is internal-only.
ctx.subscriptions.push( ctx.subscriptions.push(
commandRunner('codeQL.authenticateToGitHub', async () => { commandRunner('codeQL.authenticateToGitHub', async () => {
if (isCanary()) { /**
/** * Credentials for authenticating to GitHub.
* Credentials for authenticating to GitHub. * These are used when making API calls.
* These are used when making API calls. */
*/ const credentials = await Credentials.initialize(ctx);
const credentials = await Credentials.initialize(ctx); const octokit = await credentials.getOctokit();
const octokit = await credentials.getOctokit(); const userInfo = await octokit.users.getAuthenticated();
const userInfo = await octokit.users.getAuthenticated(); void showAndLogInformationMessage(`Authenticated to GitHub as user: ${userInfo.data.login}`);
void showAndLogInformationMessage(`Authenticated to GitHub as user: ${userInfo.data.login}`);
}
})); }));
ctx.subscriptions.push( ctx.subscriptions.push(