Resolve dependency cycles between actions-util and workflow
This commit is contained in:
parent
0bc4788cf7
commit
2637069a45
39 changed files with 532 additions and 527 deletions
6
lib/upload-sarif-action.js
generated
6
lib/upload-sarif-action.js
generated
|
|
@ -32,7 +32,7 @@ const repository_1 = require("./repository");
|
|||
const upload_lib = __importStar(require("./upload-lib"));
|
||||
const util_1 = require("./util");
|
||||
async function sendSuccessStatusReport(startedAt, uploadStats) {
|
||||
const statusReportBase = await actionsUtil.createStatusReportBase("upload-sarif", "success", startedAt);
|
||||
const statusReportBase = await (0, api_client_1.createStatusReportBase)("upload-sarif", "success", startedAt);
|
||||
const statusReport = {
|
||||
...statusReportBase,
|
||||
...uploadStats,
|
||||
|
|
@ -42,7 +42,7 @@ async function sendSuccessStatusReport(startedAt, uploadStats) {
|
|||
async function run() {
|
||||
const startedAt = new Date();
|
||||
(0, util_1.initializeEnvironment)((0, actions_util_1.getActionVersion)());
|
||||
if (!(await (0, api_client_1.sendStatusReport)(await actionsUtil.createStatusReportBase("upload-sarif", "starting", startedAt)))) {
|
||||
if (!(await (0, api_client_1.sendStatusReport)(await (0, api_client_1.createStatusReportBase)("upload-sarif", "starting", startedAt)))) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
|
|
@ -62,7 +62,7 @@ async function run() {
|
|||
const message = error.message;
|
||||
core.setFailed(message);
|
||||
console.log(error);
|
||||
await (0, api_client_1.sendStatusReport)(await actionsUtil.createStatusReportBase("upload-sarif", actionsUtil.getActionsStatus(error), startedAt, message, error.stack));
|
||||
await (0, api_client_1.sendStatusReport)(await (0, api_client_1.createStatusReportBase)("upload-sarif", actionsUtil.getActionsStatus(error), startedAt, message, error.stack));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue