Skip to content

Commit 9331b35

Browse files
authored
Merge pull request github#6914 from tamasvajk/feature/improve-csv-pr-commenter
Introduce foldable region in CSV coverage PR comments
2 parents 233a334 + 70ffbae commit 9331b35

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

misc/scripts/library-coverage/comment-pr.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,13 @@ def get_comment_text(output_file, repo, run_id):
2525

2626
comment = comment_first_line + \
2727
f"The generated reports are available in the [artifacts of this workflow run](https://github.com/{repo}/actions/runs/{run_id}). " + \
28-
"The differences will be picked up by the nightly job after the PR gets merged. "
29-
30-
if size < 2000:
31-
print("There's a small change in the CSV framework coverage reports")
32-
comment += "The following differences were found: \n\n"
33-
with open(output_file, 'r') as file:
34-
comment += file.read()
35-
else:
36-
print("There's a large change in the CSV framework coverage reports")
37-
comment += f"The differences can be found in the {comparison_artifact_name} [artifact of this workflow run](https://github.com/{repo}/actions/runs/{run_id})."
28+
"The differences will be picked up by the nightly job after the PR gets merged.\n\n"
29+
30+
comment += "<details><summary>Click to show differences in coverage</summary>\n\n"
31+
with open(output_file, 'r') as file:
32+
comment += file.read()
33+
34+
comment += "</details>\n"
3835

3936
return comment
4037

0 commit comments

Comments
 (0)