CI: add a fail note to translation ci
This commit is contained in:
parent
15b4b1dd91
commit
c02a6184d3
1 changed files with 7 additions and 1 deletions
8
.github/workflows/translation-ai-check.yml
vendored
8
.github/workflows/translation-ai-check.yml
vendored
|
|
@ -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" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue