Merge remote-tracking branch 'origin/main' into koesie10/download-github-database-authentication

This commit is contained in:
Koen Vlaswinkel
2023-11-20 11:14:13 +01:00
2 changed files with 5 additions and 10 deletions

View File

@@ -7,8 +7,8 @@ import { asError, getErrorMessage } from "../common/helpers-pure";
import {
askForGitHubDatabaseDownload,
CodeqlDatabase,
findGitHubDatabasesForRepository,
downloadDatabaseFromGitHub,
findGitHubDatabasesForRepository,
} from "./github-database-prompt";
import { GitHubDatabaseConfig, GitHubDatabaseConfigListener } from "../config";
import { DatabaseManager } from "./local-databases";

View File

@@ -39,22 +39,17 @@ export async function askForGitHubDatabaseDownload(
): Promise<boolean> {
const languages = databases.map((database) => database.language);
const databasesMessage =
const message =
databases.length === 1
? `This repository has an origin (GitHub) that has a ${getLanguageDisplayName(
languages[0],
)} CodeQL database.`
)} CodeQL database. Download the existing database from GitHub?`
: `This repository has an origin (GitHub) that has ${joinLanguages(
languages,
)} CodeQL databases.`;
const connectMessage =
databases.length === 1
? `Download the existing database from GitHub?`
: `Download any existing databases from GitHub?`;
)} CodeQL databases. Download any existing databases from GitHub?`;
const answer = await showNeverAskAgainDialog(
`${databasesMessage} ${connectMessage}`,
message,
false,
"Download",
"Not now",