From f86f37a955315e1ace283841b0f94f5e7c1948b5 Mon Sep 17 00:00:00 2001 From: Byron Goldsack Date: Wed, 3 Sep 2025 15:21:22 +1200 Subject: [PATCH] Account for existing content in step summary --- src/report/get-report.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/report/get-report.ts b/src/report/get-report.ts index 5ea44fe..fad9fcc 100644 --- a/src/report/get-report.ts +++ b/src/report/get-report.ts @@ -56,7 +56,12 @@ export function getReport(results: TestRunResult[], options: ReportOptions = DEF } function getMaxReportLength(options: ReportOptions = DEFAULT_OPTIONS): number { - return options.useActionsSummary ? MAX_ACTIONS_SUMMARY_LENGTH : MAX_REPORT_LENGTH + if (options.useActionsSummary) { + const currentSummaryContent = core.summary.stringify() + const currentSummarySize = getByteLength(currentSummaryContent) + return MAX_ACTIONS_SUMMARY_LENGTH - currentSummarySize + } + return MAX_REPORT_LENGTH } function trimReport(lines: string[], options: ReportOptions): string {