Compare commits

...

1 Commits

Author SHA1 Message Date
Michael B. Gale
664ad1aa6a Do not attempt to upload undefined status reports 2025-07-16 14:48:30 +01:00
3 changed files with 12 additions and 1 deletions

4
lib/status-report.js generated
View File

@@ -248,6 +248,10 @@ const INCOMPATIBLE_MSG = "CodeQL Action version is incompatible with the code sc
* Failures while calling this endpoint are logged as warings.
*/
async function sendStatusReport(statusReport) {
if (statusReport === undefined) {
core.warning(`Not uploading a status report, because of an internal problem.`);
return;
}
setJobStatusIfUnsuccessful(statusReport.status);
const statusReportJSON = JSON.stringify(statusReport);
core.debug(`Sending status report: ${statusReportJSON}`);

File diff suppressed because one or more lines are too long

View File

@@ -392,6 +392,13 @@ const INCOMPATIBLE_MSG =
export async function sendStatusReport<S extends StatusReportBase>(
statusReport: S,
): Promise<void> {
if (statusReport === undefined) {
core.warning(
`Not uploading a status report, because of an internal problem.`,
);
return;
}
setJobStatusIfUnsuccessful(statusReport.status);
const statusReportJSON = JSON.stringify(statusReport);