mirror of
https://github.com/konpa/devicon.git
synced 2025-03-14 09:49:41 +01:00
Fixed issue with wrong name referencing from github api (#677)
This commit is contained in:
parent
794e8592ba
commit
2bb95969b7
8
.github/scripts/build_assets/api_handler.py
vendored
8
.github/scripts/build_assets/api_handler.py
vendored
@ -63,7 +63,13 @@ def find_all_authors(pull_req_data, token):
|
|||||||
commits = response.json()
|
commits = response.json()
|
||||||
authors = set() # want unique authors only
|
authors = set() # want unique authors only
|
||||||
for commit in commits:
|
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)])
|
return ", ".join(["@" + author for author in list(authors)])
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user