File tree 2 files changed +7
-14
lines changed
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";
22
22
import { Config , getConfig } from "./config-utils" ;
23
23
import { uploadDatabases } from "./database-upload" ;
24
24
import { uploadDependencyCaches } from "./dependency-caching" ;
25
+ import { shouldPerformDiffInformedAnalysis } from "./diff-informed-analysis-utils" ;
25
26
import { EnvVar } from "./environment" ;
26
27
import { Features } from "./feature-flags" ;
27
28
import { Language } from "./languages" ;
@@ -269,11 +270,14 @@ async function run() {
269
270
logger ,
270
271
) ;
271
272
272
- const diffRangePackDir = await setupDiffInformedQueryRun (
273
+ const branches = await shouldPerformDiffInformedAnalysis (
273
274
codeql ,
274
- logger ,
275
275
features ,
276
+ logger ,
276
277
) ;
278
+ const diffRangePackDir = branches
279
+ ? await setupDiffInformedQueryRun ( branches , logger )
280
+ : undefined ;
277
281
278
282
await warnIfGoInstalledAfterInit ( config , logger ) ;
279
283
await runAutobuildIfLegacyGoWorkflow ( config , logger ) ;
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import { addDiagnostic, makeDiagnostic } from "./diagnostics";
16
16
import {
17
17
DiffThunkRange ,
18
18
PullRequestBranches ,
19
- shouldPerformDiffInformedAnalysis ,
20
19
writeDiffRangesJsonFile ,
21
20
} from "./diff-informed-analysis-utils" ;
22
21
import { EnvVar } from "./environment" ;
@@ -263,19 +262,9 @@ async function finalizeDatabaseCreation(
263
262
* the diff range information, or `undefined` if the feature is disabled.
264
263
*/
265
264
export async function setupDiffInformedQueryRun (
266
- codeql : CodeQL ,
265
+ branches : PullRequestBranches ,
267
266
logger : Logger ,
268
- features : FeatureEnablement ,
269
267
) : Promise < string | undefined > {
270
- const branches = await shouldPerformDiffInformedAnalysis (
271
- codeql ,
272
- features ,
273
- logger ,
274
- ) ;
275
- if ( ! branches ) {
276
- return undefined ;
277
- }
278
-
279
268
return await withGroupAsync (
280
269
"Generating diff range extension pack" ,
281
270
async ( ) => {
You can’t perform that action at this time.
0 commit comments