Skip to content

Commit

Permalink
Truncate summary if too long
Browse files Browse the repository at this point in the history
  • Loading branch information
ataylorme committed Mar 1, 2024
1 parent 14956b4 commit 748e705
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/getPullRequestChangedAnalyzedReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export default async function getPullRequestChangedAnalyzedReport(
markdown += `\n\n# Non-Pull Request Changed Files ESLint Results:\n**${analyzedNonPullRequestReport.summary}**\n${analyzedNonPullRequestReport.markdown}`
}

if (markdown.length > 65535) {
markdown = markdown.slice(0, 65250) + '\n\n...summary too long, truncated.'
}

return {
errorCount: analyzedPullRequestReport.errorCount,
warningCount: analyzedPullRequestReport.warningCount,
Expand Down

0 comments on commit 748e705

Please sign in to comment.