Skip to content
Open
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
6 changes: 4 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,8 @@ async function run(): Promise<void> {
summary.addScannedFiles(changes)
printScannedDependencies(changes)

// include full summary in output; Actions will truncate if oversized
// PR comment/summary handling
let rendered = core.summary.stringify()
Comment on lines +245 to 246
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment "include full summary in output" is now misleading: comment-content is no longer set to the full core.summary.stringify() result, but to the post-processed rendered value after handleLargeSummary and the MAX_COMMENT_LENGTH fallback. Please update or remove this comment to match the new behavior.

Copilot uses AI. Check for mistakes.
core.setOutput('comment-content', rendered)

// Handle large summaries by uploading as artifact
rendered = await handleLargeSummary(rendered)
Expand All @@ -257,6 +256,9 @@ async function run(): Promise<void> {
rendered = minSummary
}

// Set the actual PR comment as output (minimal version if too large for a comment on GitHub)
core.setOutput('comment-content', rendered)

Comment on lines +259 to +261
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The behavior of the comment-content output changed (it now reflects the final PR comment after truncation/minimal fallback). There doesn't appear to be test coverage asserting which string is emitted via core.setOutput('comment-content', ...) for oversized summaries; consider extracting the "final rendered comment" selection into a small helper and adding unit tests for the normal / >1MB / >MAX_COMMENT_LENGTH paths to prevent regressions.

Copilot uses AI. Check for mistakes.
// update the PR comment if needed with the right-sized summary
await commentPr(rendered, config, issueFound)
} catch (error) {
Expand Down