mirror of
https://github.com/github/codeql-action.git
synced 2026-04-27 01:08:46 +00:00
Separate generateFailedSarif out of prepareFailedSarif
This commit is contained in:
Generated
+10
-1
@@ -169806,6 +169806,15 @@ async function prepareFailedSarif(logger, features, config) {
|
||||
}
|
||||
const category = getCategoryInputOrThrow(workflow, jobName, matrix);
|
||||
const checkoutPath = getCheckoutPathInputOrThrow(workflow, jobName, matrix);
|
||||
const result = await generateFailedSarif(
|
||||
features,
|
||||
config,
|
||||
category,
|
||||
checkoutPath
|
||||
);
|
||||
return new Success(result);
|
||||
}
|
||||
async function generateFailedSarif(features, config, category, checkoutPath) {
|
||||
const databasePath = config.dbLocation;
|
||||
const codeql = await getCodeQL(config.codeQLCmd);
|
||||
const sarifFile = "../codeql-failed-run.sarif";
|
||||
@@ -169814,7 +169823,7 @@ async function prepareFailedSarif(logger, features, config) {
|
||||
} else {
|
||||
await codeql.databaseExportDiagnostics(databasePath, sarifFile, category);
|
||||
}
|
||||
return new Success({ sarifFile, category, checkoutPath });
|
||||
return { sarifFile, category, checkoutPath };
|
||||
}
|
||||
async function maybeUploadFailedSarif(config, repositoryNwo, features, logger) {
|
||||
const failedSarifResult = await prepareFailedSarif(logger, features, config);
|
||||
|
||||
Reference in New Issue
Block a user