Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Work towards removing all unauthenticated requests to the GitHub API #565

Merged
merged 1 commit into from
Jan 30, 2013
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
6 changes: 4 additions & 2 deletions gittip/elsewhere/github.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import gittip
import logging
import requests
import os
from aspen import json, log, Response
from aspen.website import Website
from aspen.utils import typecheck
Expand Down Expand Up @@ -98,8 +99,9 @@ def get_user_info(login):
if rec is not None:
user_info = rec['user_info']
else:
url = "https://api.github.com/users/%s"
user_info = requests.get(url % login)
url = "https://api.github.com/users/%s?client_id=%s"
user_info = requests.get(url % (login,
os.environ.get('GITHUB_CLIENT_ID')))
status = user_info.status_code
content = user_info.text
if status == 200:
Expand Down