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

Function get_github_user_data

app/git/utils.py:260–274  ·  view source on GitHub ↗

Get the user's github profile information. Args: oauth_token (str): The Github OAuth2 token to use for authentication. Returns: requests.Response: The Github user response.

(oauth_token)

Source from the content-addressed store, hash-verified

258
259
260def get_github_user_data(oauth_token):
261 """Get the user's github profile information.
262
263 Args:
264 oauth_token (str): The Github OAuth2 token to use for authentication.
265
266 Returns:
267 requests.Response: The Github user response.
268
269 """
270 headers = dict({'Authorization': f'token {oauth_token}'}, **JSON_HEADER)
271 response = requests.get('https://api.github.com/user', headers=headers)
272 if response.status_code == 200:
273 return response.json()
274 return {}
275
276
277def get_github_primary_email(oauth_token):

Callers 5

new_interestFunction · 0.90
remove_interestFunction · 0.90

Calls

no outgoing calls

Tested by 2