MCPcopy
hub / github.com/gitcoinco/web / get_github_avatar

Function get_github_avatar

app/avatar/utils.py:400–416  ·  view source on GitHub ↗

Pull the latest avatar from Github and store in Avatar.png. Returns: bool: Whether or not the Github avatar was updated.

(handle)

Source from the content-addressed store, hash-verified

398
399
400def get_github_avatar(handle):
401 """Pull the latest avatar from Github and store in Avatar.png.
402
403 Returns:
404 bool: Whether or not the Github avatar was updated.
405
406 """
407 remote_user = get_user(handle)
408 avatar_url = remote_user.get('avatar_url')
409 if not avatar_url:
410 return False
411
412 temp_avatar = get_temp_image_file(avatar_url)
413 if not temp_avatar:
414 return False
415
416 return temp_avatar
417
418
419def convert_img(obj, input_fmt='svg', output_fmt='png'):

Callers 1

pull_github_avatarMethod · 0.90

Calls 2

get_userFunction · 0.90
get_temp_image_fileFunction · 0.85

Tested by

no test coverage detected