Skip to content

Commit 0be743e

Browse files
authored
Fail summary in comment (#10474)
1 parent 030f818 commit 0be743e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/actions/test_ya/action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,13 @@ runs:
407407
echo "ya make returned $RC, build failed"
408408
echo "status=failed" >> $GITHUB_OUTPUT
409409
BUILD_FAILED=1
410-
echo "Build failed, see the [logs]($YA_MAKE_OUTPUT_URL)." | GITHUB_TOKEN="${{ github.token }}" .github/scripts/tests/comment-pr.py --color red
410+
# sed is to remove richness (tags like '[[rst]]')
411+
(( \
412+
cat $CURRENT_REPORT \
413+
| jq -r '.results[] | select((.status == "FAILED") and (.error_type == "REGULAR") and (.type = "build")) | "path: " + .path + "\n\n" + ."rich-snippet" + "\n\n\n"' \
414+
| sed 's/\[\[.*\]\]//' \
415+
) || true) > $CURRENT_PUBLIC_DIR/fail_summary.txt
416+
echo "Build failed, see the [logs]($YA_MAKE_OUTPUT_URL). Also see [fail summary]($CURRENT_PUBLIC_DIR_URL/fail_summary.txt)" | GITHUB_TOKEN="${{ github.token }}" .github/scripts/tests/comment-pr.py --color red
411417
break
412418
fi
413419

0 commit comments

Comments
 (0)