GitHub: Fix KeyError in announces (the API has changed). Closes GH-145.

master
Valentin Lorentz 2014-02-27 06:43:38 +00:00
parent 8a54d6e86f
commit 3ec6a81779
1 changed files with 2 additions and 2 deletions

View File

@ -155,7 +155,7 @@ class GitHub(callbacks.Plugin):
log.error('Cannot connect to git.io: %s' % e)
s = _('%s/%s (in %s): %s committed %s %s') % \
(payload['repository']['owner']['name'],
(payload['repository']['owner']['login'],
bold(payload['repository']['name']),
bold(payload['ref'].split('/')[-1]),
commit['author']['name'],
@ -168,7 +168,7 @@ class GitHub(callbacks.Plugin):
return ircmsgs.privmsg(channel, s)
def onPayload(self, payload):
repo = '%s/%s' % (payload['repository']['owner']['name'],
repo = '%s/%s' % (payload['repository']['owner']['login'],
payload['repository']['name'])
announces = self._load()
if repo not in announces: