File tree Expand file tree Collapse file tree 2 files changed +7
-14
lines changed
Expand file tree Collapse file tree 2 files changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import { getCodeQL } from "./codeql";
2222import { Config , getConfig } from "./config-utils" ;
2323import { uploadDatabases } from "./database-upload" ;
2424import { uploadDependencyCaches } from "./dependency-caching" ;
25+ import { shouldPerformDiffInformedAnalysis } from "./diff-informed-analysis-utils" ;
2526import { EnvVar } from "./environment" ;
2627import { Features } from "./feature-flags" ;
2728import { Language } from "./languages" ;
@@ -269,11 +270,14 @@ async function run() {
269270 logger ,
270271 ) ;
271272
272- const diffRangePackDir = await setupDiffInformedQueryRun (
273+ const branches = await shouldPerformDiffInformedAnalysis (
273274 codeql ,
274- logger ,
275275 features ,
276+ logger ,
276277 ) ;
278+ const diffRangePackDir = branches
279+ ? await setupDiffInformedQueryRun ( branches , logger )
280+ : undefined ;
277281
278282 await warnIfGoInstalledAfterInit ( config , logger ) ;
279283 await runAutobuildIfLegacyGoWorkflow ( config , logger ) ;
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import { addDiagnostic, makeDiagnostic } from "./diagnostics";
1616import {
1717 DiffThunkRange ,
1818 PullRequestBranches ,
19- shouldPerformDiffInformedAnalysis ,
2019 writeDiffRangesJsonFile ,
2120} from "./diff-informed-analysis-utils" ;
2221import { EnvVar } from "./environment" ;
@@ -263,19 +262,9 @@ async function finalizeDatabaseCreation(
263262 * the diff range information, or `undefined` if the feature is disabled.
264263 */
265264export async function setupDiffInformedQueryRun (
266- codeql : CodeQL ,
265+ branches : PullRequestBranches ,
267266 logger : Logger ,
268- features : FeatureEnablement ,
269267) : Promise < string | undefined > {
270- const branches = await shouldPerformDiffInformedAnalysis (
271- codeql ,
272- features ,
273- logger ,
274- ) ;
275- if ( ! branches ) {
276- return undefined ;
277- }
278-
279268 return await withGroupAsync (
280269 "Generating diff range extension pack" ,
281270 async ( ) => {
You can’t perform that action at this time.
0 commit comments