Skip to content

Commit a906477

Browse files
committed
Fail workflow if COMMENT_ID fails validation
And print an error message to STDERR.
1 parent c9a5cb4 commit a906477

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/post-pr-comment.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ jobs:
6363
# Update existing comment
6464
jq --rawfile body comment_body.txt '{"body":$body}' -n | gh api "repos/${GITHUB_REPOSITORY}/issues/comments/${COMMENT_ID}" -X PATCH --input -
6565
else
66-
echo "Comment ${RAW_COMMENT_ID} did not pass validations: not editing."
66+
echo "Comment ${RAW_COMMENT_ID} did not pass validations: not editing." >&2
67+
exit 1
6768
fi
6869
else
6970
# Create new comment

0 commit comments

Comments
 (0)