summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/translation-ai-check.yml8
1 files changed, 7 insertions, 1 deletions
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" \