get_github_creds() returns a two-tuple

This commit is contained in:
David Baumgold
2014-05-07 16:42:05 -04:00
parent c1f5fe6ed9
commit b319086589

View File

@@ -261,9 +261,9 @@ def get_pr_info(num):
Returns the info from the Github API
"""
url = "https://api.github.com/repos/edx/edx-platform/pulls/{num}".format(num=num)
credentials = get_github_creds()
username, token = get_github_creds()
headers = {
"Authorization": "token {}".format(credentials[1]),
"Authorization": "token {}".format(token),
"User-Agent": "edx-release",
}
response = requests.get(url, headers=headers)