@@ -87,6 +87,7 @@ export async function promptImportInternetDatabase(
8787 * @param cli the CodeQL CLI server
8888 * @param language the language to download. If undefined, the user will be prompted to choose a language.
8989 * @param makeSelected make the new database selected in the databases panel (default: true)
90+ * @param addSourceArchiveFolder whether to add a workspace folder containing the source archive to the workspace
9091 */
9192export async function promptImportGithubDatabase (
9293 commandManager : AppCommandManager ,
@@ -97,6 +98,7 @@ export async function promptImportGithubDatabase(
9798 cli ?: CodeQLCliServer ,
9899 language ?: string ,
99100 makeSelected = true ,
101+ addSourceArchiveFolder = true ,
100102) : Promise < DatabaseItem | undefined > {
101103 const githubRepo = await askForGitHubRepo ( progress ) ;
102104 if ( ! githubRepo ) {
@@ -112,6 +114,7 @@ export async function promptImportGithubDatabase(
112114 cli ,
113115 language ,
114116 makeSelected ,
117+ addSourceArchiveFolder ,
115118 ) ;
116119
117120 if ( databaseItem ) {
@@ -163,6 +166,7 @@ export async function askForGitHubRepo(
163166 * @param cli the CodeQL CLI server
164167 * @param language the language to download. If undefined, the user will be prompted to choose a language.
165168 * @param makeSelected make the new database selected in the databases panel (default: true)
169+ * @param addSourceArchiveFolder whether to add a workspace folder containing the source archive to the workspace
166170 **/
167171export async function downloadGitHubDatabase (
168172 githubRepo : string ,
@@ -173,6 +177,7 @@ export async function downloadGitHubDatabase(
173177 cli ?: CodeQLCliServer ,
174178 language ?: string ,
175179 makeSelected = true ,
180+ addSourceArchiveFolder = true ,
176181) : Promise < DatabaseItem | undefined > {
177182 const nwo = getNwoFromGitHubUrl ( githubRepo ) || githubRepo ;
178183 if ( ! isValidGitHubNwo ( nwo ) ) {
@@ -218,6 +223,7 @@ export async function downloadGitHubDatabase(
218223 progress ,
219224 cli ,
220225 makeSelected ,
226+ addSourceArchiveFolder ,
221227 ) ;
222228}
223229
@@ -277,6 +283,7 @@ export async function importArchiveDatabase(
277283 * @param nameOverride a name for the database that overrides the default
278284 * @param progress callback to send progress messages to
279285 * @param makeSelected make the new database selected in the databases panel (default: true)
286+ * @param addSourceArchiveFolder whether to add a workspace folder containing the source archive to the workspace
280287 */
281288async function databaseArchiveFetcher (
282289 databaseUrl : string ,
@@ -287,6 +294,7 @@ async function databaseArchiveFetcher(
287294 progress : ProgressCallback ,
288295 cli ?: CodeQLCliServer ,
289296 makeSelected = true ,
297+ addSourceArchiveFolder = true ,
290298) : Promise < DatabaseItem > {
291299 progress ( {
292300 message : "Getting database" ,
@@ -329,6 +337,9 @@ async function databaseArchiveFetcher(
329337 Uri . file ( dbPath ) ,
330338 makeSelected ,
331339 nameOverride ,
340+ {
341+ addSourceArchiveFolder,
342+ } ,
332343 ) ;
333344 return item ;
334345 } else {
0 commit comments