Skip to content

Commit

Permalink
Fixed issue with wrong name referencing from github api (#677)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas-Boi authored Jun 13, 2021
1 parent 794e859 commit 2bb9596
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/scripts/build_assets/api_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ def find_all_authors(pull_req_data, token):
commits = response.json()
authors = set() # want unique authors only
for commit in commits:
authors.add(commit["commit"]["author"]["name"])
try:
# this contains proper referenceable github name
authors.add(commit["author"]["login"])
except TypeError:
# special case
authors.add(commit["commit"]["author"]["name"])
print(f"This URL didn't have an `author` attribute: {pull_req_data['commits_url']}")
return ", ".join(["@" + author for author in list(authors)])


Expand Down

0 comments on commit 2bb9596

Please sign in to comment.