Merge branch 'master' into pep8

This commit is contained in:
tobi-wan-kenobi 2017-06-05 10:56:28 +02:00 committed by GitHub
commit 63a14cb590
2 changed files with 24 additions and 7 deletions

View file

@ -41,9 +41,8 @@ class Module(bumblebee.engine.Module):
if not token:
self._count = 0
return
notifications = requests.get("https://api.github.com/notifications?access_token={}"
.format(token)).text
notifications = requests.get("https://api.github.com/notifications", headers={"Authorization":"token {}".format(token)}).text
unread = 0
for notification in json.loads(notifications):
if "unread" in notification and notification["unread"]: