Add debug output to status-report.ts

This commit is contained in:
Fotis Koutoulakis (@NlightNFotis)
2024-05-23 10:58:50 +01:00
parent b1bd8da5e7
commit b2a144d499
+3
View File
@@ -388,6 +388,7 @@ export async function sendStatusReport<S extends StatusReportBase>(
const client = getApiClient();
try {
core.debug("Sending status report to code scanning endpoint.");
await client.request(
"PUT /repos/:owner/:repo/code-scanning/analysis/status",
{
@@ -396,7 +397,9 @@ export async function sendStatusReport<S extends StatusReportBase>(
data: statusReportJSON,
},
);
core.debug("Successfully completed sending of report to code scanning endpoint.");
} catch (e) {
core.debug("Failed to send status report to code scanning endpoint.");
console.log(e);
if (isHTTPError(e)) {
switch (e.status) {