CI: add a fail note to translation ci

This commit is contained in:
Vaxry 2025-11-16 19:32:26 +00:00
parent 15b4b1dd91
commit c02a6184d3
No known key found for this signature in database
GPG key ID: 665806380871D640

View file

@ -111,8 +111,14 @@ jobs:
COMMENT="AI did not return a response."
fi
# If failed, add a note
$ADDITIONAL_NOTE = ""
if [[ $COMMENT == *"not ok"* ]]; then
$ADDITIONAL_NOTE = "\n\nPlease note this check is a guideline, not a hard requirement. It is here to help you translate. If you disagree with some points, just state that. Any typos should be fixed."
fi
# Post the review as a PR comment
jq -n --arg body "$COMMENT" '{body: ("AI translation check result:\n\n" + $body)}' > body.json
jq -n --arg body "$COMMENT" --arg note "$ADDITIONAL_NOTE" '{body: ("AI translation check result:\n\n" + $body + $note)}' > body.json
echo "CURLing https://api.github.com/repos/${{ github.repository }}/issues/$PR_NUMBER/comments"
curl -sS -X POST \
-H "Authorization: token $GITHUB_TOKEN" \