Resolve the final dependency cycle!
This commit is contained in:
parent
5658fd1df2
commit
bac7c32ff7
13 changed files with 106 additions and 105 deletions
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue