Merge pull request #6719 from ulyssessouza/fix-release-script

Fix release script for null user
This commit is contained in:
Ulysses Souza 2019-05-22 19:01:01 +02:00 committed by GitHub
commit e1baa90f6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -220,6 +220,8 @@ def get_contributors(pr_data):
commits = pr_data.get_commits()
authors = {}
for commit in commits:
if not commit or not commit.author or not commit.author.login:
continue
author = commit.author.login
authors[author] = authors.get(author, 0) + 1
return [x[0] for x in sorted(list(authors.items()), key=lambda x: x[1])]