Skip to content
Snippets Groups Projects
Commit e2a129ad authored by Ian Cordasco's avatar Ian Cordasco
Browse files

Merge pull request #299 from msabramo/make_https_optional_for_url_regex_matches

Make "s" in "https" optional to match URL w/ regex
parents 2feac594 648e584a
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -1000,7 +1000,7 @@ class GitHub(GitHubCore):
:returns: bool
"""
from re import match
m = match('https://[\w\d\-\.\:]+/\w+/[\w\._-]+/events/\w+', topic)
m = match('https?://[\w\d\-\.\:]+/\w+/[\w\._-]+/events/\w+', topic)
status = False
if mode and topic and callback and m:
data = [('hub.mode', mode), ('hub.topic', topic),
Loading
Loading
Loading
Loading
@@ -77,7 +77,7 @@ class Issue(GitHubCore):
self.number = issue.get('number')
#: Dictionary URLs for the pull request (if they exist)
self.pull_request = issue.get('pull_request')
m = match('https://[\w\d\-\.\:]+/(\S+)/(\S+)/(?:issues|pull)/\d+',
m = match('https?://[\w\d\-\.\:]+/(\S+)/(\S+)/(?:issues|pull)/\d+',
self.html_url)
#: Returns ('owner', 'repository') this issue was filed on.
self.repository = m.groups()
Loading
Loading
Loading
Loading
@@ -183,7 +183,7 @@ class PullRequest(GitHubCore):
#: GitHub.com url for review comments (not a template)
self.review_comments_url = pull.get('review_comments_url')
 
m = match('https://[\w\d\-\.\:]+/(\S+)/(\S+)/(?:issues|pull)?/\d+',
m = match('https?://[\w\d\-\.\:]+/(\S+)/(\S+)/(?:issues|pull)?/\d+',
self.issue_url)
#: Returns ('owner', 'repository') this issue was filed on.
self.repository = m.groups()
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment