mirror of
https://github.com/github/codeql-action.git
synced 2026-04-27 09:18:47 +00:00
Resolve the final dependency cycle!
This commit is contained in:
+11
-6
@@ -7,11 +7,7 @@ import * as yaml from "js-yaml";
|
||||
|
||||
import { getOptionalInput, isAnalyzingDefaultBranch } from "./actions-util";
|
||||
import * as api from "./api-client";
|
||||
import {
|
||||
Config,
|
||||
getGeneratedCodeScanningConfigPath,
|
||||
getMlPoweredJsQueriesPack,
|
||||
} from "./config-utils";
|
||||
import type { Config } from "./config-utils";
|
||||
import { EnvVar } from "./environment";
|
||||
import { errorMatchers } from "./error-matcher";
|
||||
import {
|
||||
@@ -1211,7 +1207,7 @@ async function generateCodeScanningConfig(
|
||||
if (config.augmentationProperties.injectedMlQueries) {
|
||||
// We need to inject the ML queries into the original user input before
|
||||
// we pass this on to the CLI, to make sure these get run.
|
||||
const packString = await getMlPoweredJsQueriesPack(codeql);
|
||||
const packString = await util.getMlPoweredJsQueriesPack(codeql);
|
||||
|
||||
if (augmentedConfig.packs === undefined) augmentedConfig.packs = [];
|
||||
if (Array.isArray(augmentedConfig.packs)) {
|
||||
@@ -1287,3 +1283,12 @@ export async function getTrapCachingExtractorConfigArgsForLang(
|
||||
`-O=${language}.trap.cache.write=${write}`,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the path to the code scanning configuration generated by the CLI.
|
||||
*
|
||||
* This will not exist if the configuration is being parsed in the Action.
|
||||
*/
|
||||
export function getGeneratedCodeScanningConfigPath(config: Config): string {
|
||||
return path.resolve(config.tempDir, "user-config.yaml");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user