@@ -14,6 +14,7 @@ import type { ProgressCallback } from "../common/vscode/progress";
1414import { join , dirname , parse } from "path" ;
1515import { tryGetQueryMetadata } from "../codeql-cli/query-metadata" ;
1616import { window as Window } from "vscode" ;
17+ import { pluralize } from "../common/word" ;
1718
1819// Limit to three repos when generating autofixes so not sending
1920// too many requests to autofix. Since we only need to validate
@@ -63,6 +64,27 @@ export async function viewAutofixesForVariantAnalysisResults(
6364 autofixOutputStoragePath,
6465 } = await getStoragePaths ( variantAnalysisId , storagePath ) ;
6566
67+ // Process the selected repositories:
68+ // Get sarif
69+ // Download source root
70+ // Run autofix and output results
71+ progress (
72+ progressUpdate (
73+ 3 ,
74+ 4 ,
75+ `Processing ${ pluralize ( selectedRepoNames . length , "repository" , "repositories" ) } ` ,
76+ ) ,
77+ ) ;
78+ const outputTextFiles = await processSelectedRepositories (
79+ selectedRepoNames ,
80+ variantAnalysisIdStoragePath ,
81+ sourceRootsStoragePath ,
82+ autofixOutputStoragePath ,
83+ localAutofixPath ,
84+ credentials ,
85+ logger ,
86+ ) ;
87+
6688 // TODO
6789 } ,
6890 {
@@ -237,3 +259,20 @@ async function getStoragePaths(
237259 autofixOutputStoragePath,
238260 } ;
239261}
262+
263+ /**
264+ * Processes the selected repositories for autofix generation.
265+ */
266+ async function processSelectedRepositories (
267+ selectedRepoNames : string [ ] ,
268+ variantAnalysisIdStoragePath : string ,
269+ sourceRootsStoragePath : string ,
270+ autofixOutputStoragePath : string ,
271+ localAutofixPath : string ,
272+ credentials : Credentials ,
273+ logger : NotificationLogger ,
274+ ) : Promise < string [ ] > {
275+ const outputTextFiles : string [ ] = [ ] ;
276+ // TODO
277+ return outputTextFiles ;
278+ }
0 commit comments