Skip to content

Commit 8d1123e

Browse files
david-fraleyclaude
andauthored
fix: correct jq parsing in classify-issue-severity workflow (#21238)
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent f45a179 commit 8d1123e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/classify-issue-severity.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,14 @@ jobs:
150150
exit 1
151151
fi
152152
153-
# Extract the result from the execution file
154-
RESULT=$(jq -r '.result // empty' < "$EXECUTION_FILE")
153+
# The execution file is an array of conversation messages
154+
# Extract the last assistant message's text content
155+
RESULT=$(jq -r '.[].content[]? | select(.type == "text") | .text' < "$EXECUTION_FILE" | tail -n 1)
156+
157+
if [ -z "$RESULT" ]; then
158+
echo "No text content found in execution file"
159+
exit 1
160+
fi
155161
156162
{
157163
echo "result<<EOF"

0 commit comments

Comments
 (0)