Skip to content

Conversation

@ThemeHackers
Copy link

This PR fixes a TypeError: object of type 'NoneType' has no len() that occurs when processing PushEvent payloads where the commits key is missing or None.

Changes:
Added a check in
src/gitxray/include/gh_public_events.py
to handle cases where payload.get('commits') returns None.
Defaults commits to an empty list [] to prevent len() from failing.

Verification:
Verified with a reproduction script simulating a PushEvent with missing commits.
Verified by running gitxray against the repository that caused the crash (ThemeHackers/ssf).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant