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

Commit

Permalink
Merge pull request #565 from sigmavirus24/master
Browse files Browse the repository at this point in the history
Work towards removing all unauthenticated requests to the GitHub API

Hopefully, no one minds me merging this myself.
  • Loading branch information
sigmavirus24 committed Jan 30, 2013
2 parents 5b64eeb + 5c4693f commit f2242f0
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit f2242f0

Please sign in to comment.