repo_check.py: allow URLs not ending with .git (#482)
authorMaxim Belkin <maxim.belkin@gmail.com>
Wed, 5 Aug 2020 09:05:45 +0000 (04:05 -0500)
committerGitHub <noreply@github.com>
Wed, 5 Aug 2020 09:05:45 +0000 (05:05 -0400)
bin/repo_check.py

index 31651fd25c3844fc6196a220c1781aa1e81d5591..d2f0a6352d92fd0c8b54bc801fd10350b946871b 100644 (file)
@@ -20,7 +20,7 @@ except ImportError:
 
 
 # Pattern to match Git command-line output for remotes => (user name, project name).
-P_GIT_REMOTE = re.compile(r'upstream\s+[^:]+:([^/]+)/([^.]+)\.git\s+\(fetch\)')
+P_GIT_REMOTE = re.compile(r'upstream\s+[^:]+:([^/]+)/([^.]+)(\.git)?\s+\(fetch\)')
 
 # Repository URL format string.
 F_REPO_URL = 'https://github.com/{0}/{1}/'