Skip to content

Commit b728ef9

Browse files
committed
Merge branch 'dev' of https://github.com/netwrix/docs into dev
2 parents c50b8ec + 769c2a7 commit b728ef9

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.github/workflows/agent-docusarus-dev.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
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:
@@ -83,7 +83,7 @@ jobs:
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

Comments
 (0)