mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-08-22 03:18:54 +08:00
GitHub's GraphQL API returns files: null (with no errors entry, and changedFiles misreported as 0) when a PR's diff is too large to compute. The unguarded pullRequest.files.nodes dereference in the fetcher crashed the action with 'TypeError: null is not an object', and the formatter had the same latent crash on prData.files.nodes.length. Widen the GitHubPullRequest type to files | null so the compiler enforces guards, degrade gracefully in the fetcher with a warning, and render the file count as unavailable (not '0 files') in the formatter. Fixes #1587