Compare commits

...

2 Commits

Author SHA1 Message Date
Fotis Koutoulakis (@NlightNFotis)
72dc0335f8 Add more noise to the debug output in status-report to trace function execution in CI 2024-05-23 11:04:50 +01:00
Fotis Koutoulakis (@NlightNFotis)
b2a144d499 Add debug output to status-report.ts 2024-05-23 10:58:50 +01:00

View File

@@ -373,6 +373,7 @@ const INCOMPATIBLE_MSG =
export async function sendStatusReport<S extends StatusReportBase>(
statusReport: S,
): Promise<void> {
core.debug("Inside of sendsStatusReport");
setJobStatusIfUnsuccessful(statusReport.status);
const statusReportJSON = JSON.stringify(statusReport);
@@ -383,11 +384,16 @@ export async function sendStatusReport<S extends StatusReportBase>(
return;
}
core.debug("FOTIS WAS HERE");
const nwo = getRequiredEnvParam("GITHUB_REPOSITORY");
const [owner, repo] = nwo.split("/");
const client = getApiClient();
core.debug("FOTIS WAS HERE 2");
try {
core.debug("Sending status report to code scanning endpoint.");
await client.request(
"PUT /repos/:owner/:repo/code-scanning/analysis/status",
{
@@ -396,7 +402,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) {