From 281b26524519cd6b03046f2a5dfed913c1eb99aa Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Wed, 4 Mar 2026 12:16:54 +0100 Subject: [PATCH] Address review comments --- lib/init-action-post.js | 4 ++-- src/init-action-post-helper.test.ts | 1 + src/init-action-post-helper.ts | 2 +- src/overlay/status.ts | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/init-action-post.js b/lib/init-action-post.js index e1b1f04e5..cd49ab720 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -166096,7 +166096,7 @@ function createOverlayStatus(attributes, checkRunId) { workflowRunId: getWorkflowRunID(), workflowRunAttempt: getWorkflowRunAttempt(), name: getRequiredEnvParam("GITHUB_JOB"), - ...checkRunId !== void 0 && { checkRunId } + checkRunId }; return { ...attributes, @@ -170374,7 +170374,7 @@ async function recordOverlayStatus(codeql, config, features, logger) { attemptedToBuildOverlayBaseDatabase: true, builtOverlayBaseDatabase: false }, - Number.isNaN(checkRunId) ? void 0 : checkRunId + checkRunId !== void 0 && checkRunId >= 0 ? checkRunId : void 0 ); const diskUsage = await checkDiskUsage(logger); if (diskUsage === void 0) { diff --git a/src/init-action-post-helper.test.ts b/src/init-action-post-helper.test.ts index 039c96ef7..5bdb674a1 100644 --- a/src/init-action-post-helper.test.ts +++ b/src/init-action-post-helper.test.ts @@ -374,6 +374,7 @@ test("saves overlay status when overlay-base analysis did not complete successfu attemptedToBuildOverlayBaseDatabase: true, builtOverlayBaseDatabase: false, job: { + checkRunId: undefined, workflowRunId: 12345, workflowRunAttempt: 1, name: "analyze", diff --git a/src/init-action-post-helper.ts b/src/init-action-post-helper.ts index b1fb968c0..a8f7a8731 100644 --- a/src/init-action-post-helper.ts +++ b/src/init-action-post-helper.ts @@ -283,7 +283,7 @@ async function recordOverlayStatus( attemptedToBuildOverlayBaseDatabase: true, builtOverlayBaseDatabase: false, }, - Number.isNaN(checkRunId) ? undefined : checkRunId, + checkRunId !== undefined && checkRunId >= 0 ? checkRunId : undefined, ); const diskUsage = await checkDiskUsage(logger); diff --git a/src/overlay/status.ts b/src/overlay/status.ts index 73f426059..a57835ed1 100644 --- a/src/overlay/status.ts +++ b/src/overlay/status.ts @@ -74,7 +74,7 @@ export function createOverlayStatus( workflowRunId: getWorkflowRunID(), workflowRunAttempt: getWorkflowRunAttempt(), name: getRequiredEnvParam("GITHUB_JOB"), - ...(checkRunId !== undefined && { checkRunId }), + checkRunId, }; return { ...attributes,