mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-08 17:51:20 +02:00
Update .github/workflows/ai_pr_title_review.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
711a2373e3
commit
7437b9ac0c
4
.github/workflows/ai_pr_title_review.yml
vendored
4
.github/workflows/ai_pr_title_review.yml
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user