Commit c2c2d43
authored
chore(triage-action): Fix JSON parsing (#19471)
The file is a single pretty-printed JSON array,
`JSON.stringify(messages, null, 2)` ([source
code](https://github.com/anthropics/claude-code-action/blob/edd85d61533cbba7b57ed0ca4af1750b1fdfd3c4/base-action/src/run-claude-sdk.ts#L183-L189)),
not NDJSON. This script change (treating the parsed root as a list and
collecting objects with type === "result") reads it correctly.
This is the the current error output:
```
Traceback (most recent call last):
File "/home/runner/work/sentry-javascript/sentry-javascript/.claude/skills/triage-issue/scripts/write_job_summary.py", line 109, in <module>
sys.exit(main())
^^^^^^
File "/home/runner/work/sentry-javascript/sentry-javascript/.claude/skills/triage-issue/scripts/write_job_summary.py", line 55, in main
if obj.get("type") == "result":
^^^^^^^
```
Closes #19472 (added automatically)1 parent 737bd87 commit c2c2d43
1 file changed
+15
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
55 | | - | |
| 57 | + | |
56 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
60 | 66 | | |
61 | | - | |
| 67 | + | |
62 | 68 | | |
63 | 69 | | |
64 | | - | |
| 70 | + | |
65 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
66 | 76 | | |
67 | 77 | | |
68 | 78 | | |
| |||
0 commit comments