report_errors.sh: Don't try to communicate with github if path or line is not known

This commit is contained in:
Kamil Śliwak committed 2021-01-18 15:27:00 +01:00
1 parent ca7327ec3f
commit 433c261a2f
1 file changed
+2
+2
View File
@@ -47,6 +47,8 @@ function post_review_comment_to_github
do
ERROR_PATH=$(echo $line | grep -oE ".*\.cpp")
ERROR_LINE=$(echo $line | grep -oE "[0-9]*")
[[ $ERROR_PATH != "" ]] || { echo "ERROR: Error message does not contain file path."; exit 1; }
[[ $ERROR_LINE != "" ]] || { echo "ERROR: Error message does not contain line number."; exit 1; }
curl --request POST \
--url $GITHUB_API_URL \