From c02a6184d36661b9fffd96fa5d543339c694c549 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 16 Nov 2025 19:32:26 +0000 Subject: [PATCH] CI: add a fail note to translation ci --- .github/workflows/translation-ai-check.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/translation-ai-check.yml b/.github/workflows/translation-ai-check.yml index 22945d50..d0fbd3e4 100644 --- a/.github/workflows/translation-ai-check.yml +++ b/.github/workflows/translation-ai-check.yml @@ -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" \