Skip to content

Commit 260ed6a

Browse files
authored
[summarize-checks] write summary immediately after add (#36573)
- ensures partial summary is written if exit early
1 parent a134367 commit 260ed6a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/src/summarize-checks/summarize-checks.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,8 @@ export async function summarizeChecksImpl(
366366
const prUrl = `https://github.com/${owner}/${repo}/pull/${issue_number}`;
367367
core.summary.addRaw("PR: ");
368368
core.summary.addLink(prUrl, prUrl);
369+
core.summary.write();
370+
core.setOutput("summary", process.env.GITHUB_STEP_SUMMARY);
369371

370372
let labelNames = await getExistingLabels(github, owner, repo, issue_number);
371373

@@ -446,6 +448,7 @@ export async function summarizeChecksImpl(
446448
`Updating comment '${NEXT_STEPS_COMMENT_ID}' on ${owner}/${repo}#${issue_number} with body: ${commentBody}`,
447449
);
448450
core.summary.addRaw(`\n${commentBody}\n\n`);
451+
core.summary.write();
449452

450453
// this will remain commented until we're comfortable with the change.
451454
// await commentOrUpdate(
@@ -465,9 +468,7 @@ export async function summarizeChecksImpl(
465468
);
466469
core.summary.addHeading("Automated Checks Met", 2);
467470
core.summary.addCodeBlock(JSON.stringify(automatedChecksMet, null, 2));
468-
469471
core.summary.write();
470-
core.setOutput("summary", process.env.GITHUB_STEP_SUMMARY);
471472
}
472473

473474
/**

0 commit comments

Comments
 (0)