Job summary shows truncated message
We have a pull request that exceeds the max_files number and the python-coverage-comment-action displays this message at the bottom of the coverage comment.
When I navigate to the workflow summary page, it shows a similar message about truncating:
https://github.com/<org>/<repo>/actions/runs/<run_id>/attempts/<attempt_num>#summary-<summary_id>
From what I can tell, the add_job_summary function is passed the same comment as was generated for the pull request, which includes the default max_files:
https://github.com/py-cov-action/python-coverage-comment-action/blob/e1188d571bebf0a4db96a5fba886b537a0f90457/coverage_comment/main.py#L167-L184
https://github.com/py-cov-action/python-coverage-comment-action/blob/e1188d571bebf0a4db96a5fba886b537a0f90457/coverage_comment/main.py#L202-L204
I would be happy to create a pull request to resolve this if needed, I would propose to either re-generate the markdown without the max_files parameter or conditionally re-generate it if the number of files exceeds the max_files setting. Is there a preference from the authors/maintainers?
Also, it might be nifty to add a link to the workflow summary from the error message, I could try to take a crack at that too as part of this fix.
Ah oops, I believe I completely forgot to generate the full report, you're right.
I would propose to either re-generate the markdown without the max_files parameter or conditionally re-generate it if the number of files exceeds the max_files setting. Is there a preference from the authors/maintainers?
I believe the generation is likely a few milliseconds, so either way, but likely generate it twice will lead to the clearest code.
Also, it might be nifty to add a link to the workflow summary from the error message, I could try to take a crack at that too as part of this fix.
Good idea!
And thank you for your proposal of doing the PR :) It will be a pleasure!
Closed with #444