mirror of
https://github.com/github/codeql-action.git
synced 2026-04-27 01:08:46 +00:00
Rename initAnalysisKinds to getAnalysisKinds and cache results
This commit is contained in:
Generated
+10
-6
@@ -86085,8 +86085,12 @@ async function parseAnalysisKinds(input) {
|
||||
new Set(components.map((component) => component))
|
||||
);
|
||||
}
|
||||
async function initAnalysisKinds(logger) {
|
||||
const analysisKinds = await parseAnalysisKinds(
|
||||
var cachedAnalysisKinds;
|
||||
async function getAnalysisKinds(logger, skipCache = false) {
|
||||
if (!skipCache && cachedAnalysisKinds !== void 0) {
|
||||
return cachedAnalysisKinds;
|
||||
}
|
||||
cachedAnalysisKinds = await parseAnalysisKinds(
|
||||
getRequiredInput("analysis-kinds")
|
||||
);
|
||||
const qualityQueriesInput = getOptionalInput("quality-queries");
|
||||
@@ -86095,10 +86099,10 @@ async function initAnalysisKinds(logger) {
|
||||
"The `quality-queries` input is deprecated and will be removed in a future version of the CodeQL Action. Use the `analysis-kinds` input to configure different analysis kinds instead."
|
||||
);
|
||||
}
|
||||
if (!analysisKinds.includes("code-quality" /* CodeQuality */) && qualityQueriesInput !== void 0) {
|
||||
analysisKinds.push("code-quality" /* CodeQuality */);
|
||||
if (!cachedAnalysisKinds.includes("code-quality" /* CodeQuality */) && qualityQueriesInput !== void 0) {
|
||||
cachedAnalysisKinds.push("code-quality" /* CodeQuality */);
|
||||
}
|
||||
return analysisKinds;
|
||||
return cachedAnalysisKinds;
|
||||
}
|
||||
var codeQualityQueries = ["code-quality"];
|
||||
|
||||
@@ -90796,7 +90800,7 @@ async function run() {
|
||||
getOptionalInput("source-root") || ""
|
||||
);
|
||||
try {
|
||||
const analysisKinds = await initAnalysisKinds(logger);
|
||||
const analysisKinds = await getAnalysisKinds(logger);
|
||||
await sendStartingStatusReport(startedAt, { analysisKinds }, logger);
|
||||
const codeQLDefaultVersionInfo = await features.getDefaultCliVersion(
|
||||
gitHubVersion.type
|
||||
|
||||
Reference in New Issue
Block a user