fix PR helper when commits have no author. (#10959)

PR helper fails when author information is null. Adding a check before
get login name.

![image](https://github.com/google/oss-fuzz/assets/39108850/f4f3aaa8-3edb-4745-93e1-c6da047d0b7b)
https://github.com/google/oss-fuzz/issues/10955
This commit is contained in:
Holly Gong 2023-09-14 12:59:14 +10:00 committed by GitHub
parent 868a94f2f0
commit d81e44f16c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -243,6 +243,9 @@ class GithubHandler:
if i >= COMMITS_LIMIT: if i >= COMMITS_LIMIT:
break break
if not commit['author'] or not commit['commit']:
continue
login = commit['author']['login'] login = commit['author']['login']
verified = commit['commit']['verification']['verified'] verified = commit['commit']['verification']['verified']
if login in self._maintainers: if login in self._maintainers: