Hide details when report exceeds size limit #278
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is based on the discussion in #262
Fixes #262
Hello,
Thank you for the detailed explanations and possible solutions. In the end, I decided to implement v1 of the discussed solutions in #262. The action will now omit coverage details spoilers below the summary if the report size exceeds the GitHub limit, like in the picture:
All in all, I think this is a pretty edge-casey issue, as usually PRs shouldn't grow that big in size, except when one does do a significant refactor. This solution is not perfect - it only strips the details, and doesn't cover for the case where the failed test results are a majority of the coverage report.
I'm not familiar enough with the tool to implement a smart truncation mechanism properly.
In my opinion, that would require either a bigger refactor or just drilling a param to truncate the details through various
formatCoverage
helper functions all the way to the bottom. We could think of perhaps, always truncating more than 50 rows of the tables, as I feel like that's too much already for a PR. Doing it that way, we could avoid drilling parameters. But that may not solve the issue of reports being too long that we set out to fix in the first place :P