Trims output length to avoid hitting github 2Mb limitation

pull/206/head
ahub 2022-12-05 17:14:25 +01:00
parent 34809a534f
commit 41b997136e
No known key found for this signature in database
GPG Key ID: 3ACF3A28B0636282
1 changed files with 8 additions and 0 deletions

View File

@ -76,6 +76,14 @@ const ResultsCheck = {
const pullRequest = github.context.payload.pull_request;
const headSha = (pullRequest && pullRequest.head.sha) || github.context.sha;
const maxLen = 65534;
if(output.length > maxLen)
{
core.warning(`Output too long (${output.length}) truncating to ${maxLen}`);
output = output.substring(0, maxLen);
}
core.info(`Posting results for ${headSha}`);
const createCheckRequest = {
...github.context.repo,