Skip to content

Commit

Permalink
Fix sopel-irc#415 by ignoring all future arguments if first is a digit.
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrope committed Jan 12, 2014
1 parent 1d2cf89 commit d50309f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion github.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def findIssue(bot, trigger):
return bot.say('Git module not configured, make sure github.oauth_token and github.repo are defined')
firstParam = trigger.group(2).split(' ')[0]
if firstParam.isdigit():
URL = 'https://api.github.com/repos/%s/issues/%s' % (gitAPI[1], trigger.group(2))
URL = 'https://api.github.com/repos/%s/issues/%s' % (gitAPI[1], firstParam)
elif firstParam == 'CLOSED':
if '%20'.join(trigger.group(2).split(' ')[1:]) not in ('', '\x02', '\x03'):
URL = 'https://api.github.com/legacy/issues/search/' + gitAPI[1] + '/closed/' + '%20'.join(trigger.group(2).split(' ')[1:])
Expand Down

0 comments on commit d50309f

Please sign in to comment.