Skip to content

Commit 30a3d44

Browse files
authored
Update gh_public_events.py
1 parent ebbb9f1 commit 30a3d44

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/gitxray/include/gh_public_events.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ def log_events(events, gx_output, for_repository=False):
8787

8888
# https://docs.github.com/en/rest/using-the-rest-api/github-event-types?apiVersion=2022-11-28#pushevent
8989
elif etype == "PushEvent":
90-
logging_func(f"{ts}: {actor}pushed a total of {len(payload.get('commits'))} commits from: [{payload.get('ref')}]", rtype="90d_events")
90+
commits = payload.get('commits')
91+
if commits is None: commits = []
92+
logging_func(f"{ts}: {actor}pushed a total of {len(commits)} commits from: [{payload.get('ref')}]", rtype="90d_events")
9193

9294
# https://docs.github.com/en/rest/using-the-rest-api/github-event-types?apiVersion=2022-11-28#releaseevent
9395
elif etype == "ReleaseEvent":

0 commit comments

Comments
 (0)