-
Notifications
You must be signed in to change notification settings - Fork 40
Description
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:
python-coverage-comment-action/coverage_comment/main.py
Lines 167 to 184 in e1188d5
comment = template.get_comment_markdown( | |
coverage=coverage, | |
diff_coverage=diff_coverage, | |
previous_coverage=previous_coverage, | |
previous_coverage_rate=previous_coverage_rate, | |
files=files_info, | |
count_files=count_files, | |
max_files=config.MAX_FILES_IN_COMMENT, | |
minimum_green=config.MINIMUM_GREEN, | |
minimum_orange=config.MINIMUM_ORANGE, | |
repo_name=config.GITHUB_REPOSITORY, | |
pr_number=config.GITHUB_PR_NUMBER, | |
base_template=template.read_template_file("comment.md.j2"), | |
custom_template=config.COMMENT_TEMPLATE, | |
pr_targets_default_branch=pr_targets_default_branch, | |
marker=marker, | |
subproject_id=config.SUBPROJECT_ID, | |
) |
python-coverage-comment-action/coverage_comment/main.py
Lines 202 to 204 in e1188d5
github.add_job_summary( | |
content=comment, github_step_summary=config.GITHUB_STEP_SUMMARY | |
) |
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.