INNER CODE UNIT · TypeScript

reason

cloudposse/atmos · .github/actions/stopwatch/src/index.ts:228

    const reason = `Waiting for ${incompleteJobs.length} job(s): ${incompleteJobs.map((jobData) => jobData.name).join(", ")}`;
    console.log(reason);
    await setResult(false, reason);
    return;
  }

  // Re-check immediately before writing so an older coordinator cannot replace
  // the sticky comment after the PR receives a newer commit.
  const currentPullRequest = await client.request<ApiPullRequest>("GET", pullRequestPath);
  if (currentPullRequest.state !== "open" || currentPullRequest.head.sha !== headSha) {
    const reason = `PR #${pullRequestNumber} changed while timings were being calculated`;
    console.log(reason);
    await setResult(false, reason);
    return;
  }

  const summary = calculateTimingSummary(selectedRuns, jobsByRun);
  const body = renderComment(marker, headSha, summary);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…