Refactor: move combined SARIF debug artifact logic to debug-artifact

This commit is contained in:
Angela P Wen 2024-09-12 12:55:49 -07:00
parent d4bfd40513
commit cb7faf53f6
12 changed files with 77 additions and 120 deletions

View file

@ -31,14 +31,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
const core = __importStar(require("@actions/core"));
const debugArtifacts = __importStar(require("./debug-artifacts"));
const environment_1 = require("./environment");
const uploadSarifActionPostHelper = __importStar(require("./upload-sarif-action-post-helper"));
const util_1 = require("./util");
async function runWrapper() {
try {
// Upload SARIF artifacts if we determine that this is a first-party analysis run.
// For third-party runs, this artifact will be uploaded in the `upload-sarif-post` step.
if (process.env[environment_1.EnvVar.INIT_ACTION_HAS_RUN] === "true") {
await uploadSarifActionPostHelper.uploadArtifacts(debugArtifacts.uploadDebugArtifacts);
await debugArtifacts.uploadCombinedSarifArtifacts();
}
}
catch (error) {