Skip to content

Commit 8fe52fb

Browse files
committed
fix: extract result from claude-code-action execution file
The claude-code-action doesn't output a 'result' field directly. Instead, it provides an 'execution_file' output that contains the execution details. Added a step to read this file and extract the result for downstream jobs.
1 parent a78077d commit 8fe52fb

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
if: github.event.label.name == 'triage-check'
1919
runs-on: ubuntu-latest
2020
outputs:
21-
result: ${{ steps.analysis.outputs.result }}
21+
result: ${{ steps.extract.outputs.result }}
2222

2323
steps:
2424
- name: Checkout repository
@@ -140,6 +140,23 @@ jobs:
140140
141141
**Critical**: Output ONLY the JSON object, nothing else. The JSON will be parsed and validated.
142142
143+
- name: Extract Result from Execution File
144+
id: extract
145+
run: |
146+
EXECUTION_FILE="${{ steps.analysis.outputs.execution_file }}"
147+
148+
if [ ! -f "$EXECUTION_FILE" ]; then
149+
echo "Execution file not found: $EXECUTION_FILE"
150+
exit 1
151+
fi
152+
153+
# Extract the result from the execution file
154+
RESULT=$(cat "$EXECUTION_FILE" | jq -r '.result // empty')
155+
156+
echo "result<<EOF" >> "$GITHUB_OUTPUT"
157+
echo "$RESULT" >> "$GITHUB_OUTPUT"
158+
echo "EOF" >> "$GITHUB_OUTPUT"
159+
143160
post-comment:
144161
name: Post Classification Comment
145162
needs: analyze

0 commit comments

Comments
 (0)