Resolve dependency cycle between api-client and actions-util
This commit is contained in:
parent
004f976bef
commit
0bc4788cf7
30 changed files with 217 additions and 213 deletions
8
lib/init-action.js
generated
8
lib/init-action.js
generated
|
|
@ -87,13 +87,13 @@ async function sendCompletedStatusReport(startedAt, config, toolsDownloadDuratio
|
|||
trap_cache_download_size_bytes: Math.round(await (0, trap_caching_1.getTotalCacheSize)(config.trapCaches, logger)),
|
||||
trap_cache_download_duration_ms: Math.round(config.trapCacheDownloadTime),
|
||||
};
|
||||
await (0, actions_util_1.sendStatusReport)({
|
||||
await (0, api_client_1.sendStatusReport)({
|
||||
...initWithConfigStatusReport,
|
||||
...initToolsDownloadFields,
|
||||
});
|
||||
}
|
||||
else {
|
||||
await (0, actions_util_1.sendStatusReport)({ ...initStatusReport, ...initToolsDownloadFields });
|
||||
await (0, api_client_1.sendStatusReport)({ ...initStatusReport, ...initToolsDownloadFields });
|
||||
}
|
||||
}
|
||||
async function run() {
|
||||
|
|
@ -120,7 +120,7 @@ async function run() {
|
|||
core.exportVariable(environment_1.EnvVar.JOB_RUN_UUID, (0, uuid_1.v4)());
|
||||
try {
|
||||
const workflowErrors = await (0, workflow_1.validateWorkflow)(logger);
|
||||
if (!(await (0, actions_util_1.sendStatusReport)(await (0, actions_util_1.createStatusReportBase)("init", "starting", startedAt, workflowErrors)))) {
|
||||
if (!(await (0, api_client_1.sendStatusReport)(await (0, actions_util_1.createStatusReportBase)("init", "starting", startedAt, workflowErrors)))) {
|
||||
return;
|
||||
}
|
||||
const codeQLDefaultVersionInfo = await features.getDefaultCliVersion(gitHubVersion.type);
|
||||
|
|
@ -155,7 +155,7 @@ async function run() {
|
|||
catch (unwrappedError) {
|
||||
const error = (0, util_1.wrapError)(unwrappedError);
|
||||
core.setFailed(error.message);
|
||||
await (0, actions_util_1.sendStatusReport)(await (0, actions_util_1.createStatusReportBase)("init", error instanceof util_1.UserError ? "user-error" : "aborted", startedAt, error.message, error.stack));
|
||||
await (0, api_client_1.sendStatusReport)(await (0, actions_util_1.createStatusReportBase)("init", error instanceof util_1.UserError ? "user-error" : "aborted", startedAt, error.message, error.stack));
|
||||
return;
|
||||
}
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue