8000 gh-543 Update regex to include hyphens in username · sigmavirus24/github3.py@245b3e9 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 245b3e9

Browse files
committed
gh-543 Update regex to include hyphens in username
Fix bug where a username which contains a hyphen cannot be used in the `GitHub.pubsubhubbub` method.
1 parent 649c808 commit 245b3e9
8000

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

github3/github.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ def pubsubhubbub(self, mode, topic, callback, secret=''):
996996
:returns: bool
997997
"""
998998
from re import match
999-
m = match('https?://[\w\d\-\.\:]+/\w+/[\w\._-]+/events/\w+', topic)
999+
m = match('https?://[\w\d\-\.\:]+/\w+[\w-]+\w/[\w\._-]+/events/\w+', topic)
10001000
status = False
10011001
if mode and topic and callback and m:
10021002
data = [('hub.mode', mode), ('hub.topic', topic),

0 commit comments

Comments
 (0)
0