6666 - name : Create review prompt
6767 if : steps.check-files.outputs.skip_review != 'true'
6868 run : |
69- cat > /tmp/review-prompt.txt << 'REVIEW_PROMPT_EOF '
69+ cat > /tmp/review-prompt.txt << 'EOF '
7070 Review this pull request focusing exclusively on Docusaurus infrastructure and configuration files.
7171
7272 Analyze changes to:
8383 3. Potential impact on the documentation site
8484
8585 Ignore all .md and .mdx files - focus only on the technical infrastructure.
86- REVIEW_PROMPT_EOF
86+ EOF
8787
8888 - name : Read system prompt for append
8989 if : steps.check-files.outputs.skip_review != 'true'
@@ -119,11 +119,19 @@ jobs:
119119 exit 0
120120 fi
121121
122- # Extract the last assistant message using jq
123- REVIEW_CONTENT=$(jq -r '.[] | select(.role == "assistant") | .content' "$EXECUTION_FILE" | tail -1)
122+ # Extract the last assistant message using jq - handle the nested structure
123+ REVIEW_CONTENT=$(jq -r '
124+ .[] |
125+ select(.type == "assistant") |
126+ .message.content[]? |
127+ select(.type == "text") |
128+ .text
129+ ' "$EXECUTION_FILE" | tail -1)
124130
125131 if [ -z "$REVIEW_CONTENT" ]; then
126132 echo "No review content found"
133+ echo "Execution file contents:"
134+ cat "$EXECUTION_FILE" | jq '.' | head -100
127135 exit 0
128136 fi
129137
@@ -152,4 +160,4 @@ jobs:
152160 "https://api.github.com/repos/${{ github.repository }}/issues/$PR_NUMBER/comments" \
153161 -d @-
154162
155- echo "Review posted successfully"
163+ echo "Review posted successfully"
0 commit comments