Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit648e584

Browse files
committed
Make "s" in "https" optional to match URL w/ regex
Some folks may be using a GitHub Enterprise server that doesn't supportHTTPS.
1 parent52a3f30 commit648e584

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

‎github3/github.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@ def pubsubhubbub(self, mode, topic, callback, secret=''):
10001000
:returns: bool
10011001
"""
10021002
fromreimportmatch
1003-
m=match('https://[\w\d\-\.\:]+/\w+/[\w\._-]+/events/\w+',topic)
1003+
m=match('https?://[\w\d\-\.\:]+/\w+/[\w\._-]+/events/\w+',topic)
10041004
status=False
10051005
ifmodeandtopicandcallbackandm:
10061006
data= [('hub.mode',mode), ('hub.topic',topic),

‎github3/issues/issue.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def __init__(self, issue, session=None):
7777
self.number=issue.get('number')
7878
#: Dictionary URLs for the pull request (if they exist)
7979
self.pull_request=issue.get('pull_request')
80-
m=match('https://[\w\d\-\.\:]+/(\S+)/(\S+)/(?:issues|pull)/\d+',
80+
m=match('https?://[\w\d\-\.\:]+/(\S+)/(\S+)/(?:issues|pull)/\d+',
8181
self.html_url)
8282
#: Returns ('owner', 'repository') this issue was filed on.
8383
self.repository=m.groups()

‎github3/pulls.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def __init__(self, pull, session=None):
183183
#: GitHub.com url for review comments (not a template)
184184
self.review_comments_url=pull.get('review_comments_url')
185185

186-
m=match('https://[\w\d\-\.\:]+/(\S+)/(\S+)/(?:issues|pull)?/\d+',
186+
m=match('https?://[\w\d\-\.\:]+/(\S+)/(\S+)/(?:issues|pull)?/\d+',
187187
self.issue_url)
188188
#: Returns ('owner', 'repository') this issue was filed on.
189189
self.repository=m.groups()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp