@@ -14,6 +14,7 @@ import type { ProgressCallback } from "../common/vscode/progress";
14
14
import { join , dirname , parse } from "path" ;
15
15
import { tryGetQueryMetadata } from "../codeql-cli/query-metadata" ;
16
16
import { window as Window } from "vscode" ;
17
+ import { pluralize } from "../common/word" ;
17
18
18
19
// Limit to three repos when generating autofixes so not sending
19
20
// too many requests to autofix. Since we only need to validate
@@ -63,6 +64,27 @@ export async function viewAutofixesForVariantAnalysisResults(
63
64
autofixOutputStoragePath,
64
65
} = await getStoragePaths ( variantAnalysisId , storagePath ) ;
65
66
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
+
66
88
// TODO
67
89
} ,
68
90
{
@@ -237,3 +259,20 @@ async function getStoragePaths(
237
259
autofixOutputStoragePath,
238
260
} ;
239
261
}
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