From 4603a62e00d2b41eeb611fc57be5f358efb2cfdc Mon Sep 17 00:00:00 2001 From: Art Leo Date: Wed, 22 Oct 2025 17:52:52 +1100 Subject: [PATCH] Make handleLargeSummary also update core.summary --- src/main.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index dda225a..5f988d6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -86,12 +86,18 @@ export async function handleLargeSummary( retentionDays: 1 }) - // Return a minimal summary with a link to the artifact - return `# Dependency Review Summary + // Return a shorter summary with a link to the artifact + const shortSummary = `# Dependency Review Summary The full dependency review summary is too large to display here. Please download the artifact named "${artifactName}" to view the complete report. [View full job summary](${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID})` + + // Set core.summary to the shorter summary value to avoid exceeding MAX_SUMMARY_SIZE + core.summary.emptyBuffer() + core.summary.addRaw(shortSummary) + + return shortSummary } catch (error) { core.warning( `Failed to handle large summary: ${error instanceof Error ? error.message : 'Unknown error'}`