mirror of
https://github.com/github/codeql-action.git
synced 2026-05-17 08:40:16 +00:00
Do not attempt to upload undefined status reports
This commit is contained in:
Generated
+4
@@ -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
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user