Skip to content

Conversation

@johndarmstrong
Copy link

@johndarmstrong johndarmstrong commented Jan 26, 2024

Description

In a large mono repo with multiple libraries, when there is a sizable affected run, typically a release, the output for the comment can exceed the limit for a GitHub Issue Comment Body, resulting in the following error:

PR Detected: Updating the PR Comment with Code Coverage
HttpError: Validation Failed: {"resource":"IssueComment","code":"unprocessable","field":"data","message":"Body is too long (maximum is 65536 characters)"}
    at /home/runner/work/_actions/dkhunt27/action-nx-code-coverage/v1/webpack:/nx-code-coverage/node_modules/@octokit/request/dist-node/index.js:86:1
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

This implements a path forward to expose terse comments that only include the high-level result.app, coverage %, and diffHTML values and drop the Coverage Report <details> block, truncating the output for the comment.

@dkhunt27 dkhunt27 merged commit 1f4aec1 into dkhunt27:main Apr 3, 2024
@dkhunt27
Copy link
Owner

dkhunt27 commented Apr 3, 2024

I merged this functionality into v2, but did change the variable name. hide-coverage-reports (true/false) where true is like your concise

fyi, also added hide-unchanged (true/false) where true will hide any coverage output where the diff didn't change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants