Handle API versions that reject unsuccessful executions
This commit is contained in:
parent
122b180b66
commit
37b4358e44
3 changed files with 27 additions and 7 deletions
12
lib/init-action-post-helper.js
generated
12
lib/init-action-post-helper.js
generated
|
|
@ -55,7 +55,17 @@ async function uploadFailedSarif(config, repositoryNwo, featureEnablement, logge
|
|||
core.info(`Uploading failed SARIF file ${sarifFile}`);
|
||||
const uploadResult = await uploadLib.uploadFromActions(sarifFile, checkoutPath, category, logger);
|
||||
if (uploadResult !== undefined && waitForProcessing) {
|
||||
await uploadLib.waitForProcessing(repositoryNwo, uploadResult.sarifID, logger);
|
||||
try {
|
||||
await uploadLib.waitForProcessing(repositoryNwo, uploadResult.sarifID, logger);
|
||||
}
|
||||
catch (e) {
|
||||
if (e instanceof Error && e.message.includes("unsuccessful execution")) {
|
||||
logger.info("Submitting a SARIF file for the failed run isn't yet supported, continuing.");
|
||||
}
|
||||
else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
async function run(uploadDatabaseBundleDebugArtifact, uploadLogsDebugArtifact, printDebugLogs, repositoryNwo, featureEnablement, logger) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue