report action has aborted

This commit is contained in:
Alex Kalyvitis 2020-06-23 18:36:08 +02:00
parent 98f8945cfb
commit af252d2f0d
6 changed files with 50 additions and 15 deletions

10
lib/util.js generated
View file

@ -327,6 +327,16 @@ async function reportActionSucceeded(action) {
await sendStatusReport(await createStatusReport(action, 'success'));
}
exports.reportActionSucceeded = reportActionSucceeded;
/**
* Report that an action has been aborted.
*
* Note that the started_at date is always that of the `init` action, since
* this is likely to give a more useful duration when inspecting events.
*/
async function reportActionAborted(action, cause) {
await sendStatusReport(await createStatusReport(action, 'abort', cause));
}
exports.reportActionAborted = reportActionAborted;
/**
* Get the array of all the tool names contained in the given sarif contents.
*