Skip to content

Commit 9f2d928

Browse files
author
Maximilian Karl
committed
fixed slow call user
1 parent 78bb8e3 commit 9f2d928

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

github2pandas/utility.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,8 @@ def extract_author_data_from_commit(repo, sha, users_ids, data_root_dir):
475475
commit = repo.get_commit(sha)
476476
if not commit:
477477
return None
478+
if commit._author == github.GithubObject.NotSet:
479+
return None
478480
return Utility.extract_user_data(commit.author, users_ids, data_root_dir)
479481

480482
@staticmethod
@@ -510,6 +512,8 @@ def extract_committer_data_from_commit(repo, sha, users_ids, data_root_dir):
510512
commit = repo.get_commit(sha)
511513
if not commit:
512514
return None
515+
if commit._committer == github.GithubObject.NotSet:
516+
return None
513517
return Utility.extract_user_data(commit.committer, users_ids, data_root_dir)
514518

515519
@staticmethod

0 commit comments

Comments
 (0)