8000 Fixed issue with wrong name referencing from github api by Thomas-Boi · Pull Request #677 · devicons/devicon · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fixed issue with wrong name referencing from github api #677

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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