Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/commands/openclawcode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ describe("openclawCodeRunCommand", () => {
expect(payload.runAgeSeconds).toBeNull();
});

it("prints runHasUpdatedAt as false when the workflow update signal is present but empty", async () => {
it("prints runHasUpdatedAt as false and runUpdatedAt as null when the workflow update signal is present but empty", async () => {
mocks.runIssueWorkflow.mockResolvedValue(
createRun({
updatedAt: [] as unknown as WorkflowRun["updatedAt"],
Expand All @@ -787,7 +787,7 @@ describe("openclawCodeRunCommand", () => {
await openclawCodeRunCommand({ issue: "2", repoRoot: "/repo", json: true }, runtime);

const payload = JSON.parse(runtime.log.mock.calls[0]?.[0] ?? "null");
expect(payload.runUpdatedAt).toEqual([]);
expect(payload.runUpdatedAt).toBeNull();
expect(payload.runHasUpdatedAt).toBe(false);
expect(payload.runAgeSeconds).toBeNull();
});
Expand Down
2 changes: 1 addition & 1 deletion src/commands/openclawcode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1984,7 +1984,7 @@ function toWorkflowRunJson(run: WorkflowRun) {
...run,
contractVersion: OPENCLAWCODE_RUN_JSON_CONTRACT_VERSION,
runCreatedAt: run.createdAt ?? null,
runUpdatedAt: run.updatedAt ?? null,
runUpdatedAt: typeof run.updatedAt === "string" ? run.updatedAt : null,
runHasUpdatedAt,
runAgeSeconds: resolveElapsedSeconds(run.createdAt, run.updatedAt),
issueNumber: run.issue.number ?? null,
Expand Down
Loading