Update .github/workflows/ai_pr_title_review.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Ludy 2025-06-21 23:57:55 +02:00 committed by GitHub
parent 711a2373e3
commit 7437b9ac0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -114,15 +114,13 @@ jobs:
EOF
# Validate JSON structure
VALID_JSON=$(
jq -e '
(keys | sort) == ["improved_ai_title_rating", "improved_rating", "improved_title"] and
(.improved_rating | type == "number" and . >= 0 and . <= 10) and
(.improved_ai_title_rating | type == "number" and . >= 0 and . <= 10) and
(.improved_title | type == "string")
' ai_response.json
)
if [ -z "$VALID_JSON" ]; then
if [ $? -ne 0 ]; then
echo "Invalid AI response format" >&2
cat ai_response.json >&2
exit 1