1
0
Fork 0
mirror of https://github.com/ejwa/gitinspector.git synced 2025-03-26 02:01:27 +01:00

Use the github gravatar in output.

This commit is contained in:
Jose M Vidal 2020-11-13 20:28:09 -05:00
parent 2ec52e73b5
commit 7bbeb8e8d7
No known key found for this signature in database
GPG key ID: 6CCCEDE7C44757DB

View file

@ -108,6 +108,11 @@ class BlameOutput(Outputable):
name_json = "\t\t\t\t\"name\": \"" + i[0] + "\",\n"
email_json = "\t\t\t\t\"email\": \"" + author_email + "\",\n"
gravatar_json = "\t\t\t\t\"gravatar\": \"" + gravatar.get_url(author_email) + "\",\n"
username = gravatar.get_username(author_email)
if username:
gravatar_json = "\t\t\t\t\"github\": \"" + username + "\",\n"
else:
gravatar_json = "\t\t\t\t\"github\": \"" + "None" + "\",\n"
rows_json = "\t\t\t\t\"rows\": " + str(i[1].rows) + ",\n"
stability_json = ("\t\t\t\t\"stability\": " + "{0:.1f}".format(Blame.get_stability(i[0], i[1].rows,
self.changes)) + ",\n")