docs: fix execution file parsing example by looooown2006 · Pull Request #1297 · anthropics/claude-code-action (original) (raw)

Summary

Fixes the base-action/README.md example for parsing execution_file.

The previous example looked for executionLog[i].role === 'assistant', but the execution log contains SDK events with top-level type fields. Assistant content is nested under message.content, and successful runs also include a final type: "result" event.

This updates the example to:

Tests

Note: I did not run bun test / bun run typecheck because Bun is not installed in this local environment. This is a README-only documentation change.

Closes #1296.