mirror of
https://github.com/konpa/devicon.git
synced 2025-08-08 07:36:28 +02:00
Fixed issue with wrong name referencing from github api (#677)
This commit is contained in:
6
.github/scripts/build_assets/api_handler.py
vendored
6
.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:
|
||||||
|
try:
|
||||||
|
# this contains proper referenceable github name
|
||||||
|
authors.add(commit["author"]["login"])
|
||||||
|
except TypeError:
|
||||||
|
# special case
|
||||||
authors.add(commit["commit"]["author"]["name"])
|
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)])
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user