import: use .git suffix only for repo-url

This commit is contained in:
Boris Kraut 2016-03-06 11:14:14 +01:00
parent 495b2057ed
commit f4ce1737d9

View file

@ -97,10 +97,10 @@ def get_metadata_from_url(app, url):
projecttype = 'gitlab' projecttype = 'gitlab'
# git can be fussy with gitlab URLs unless they end in .git # git can be fussy with gitlab URLs unless they end in .git
if url.endswith('.git'): if url.endswith('.git'):
repo = url url = url[:-4]
else:
repo = url + '.git' repo = url + '.git'
repotype = 'git' repotype = 'git'
app.WebSite = url
app.SourceCode = url + '/tree/HEAD' app.SourceCode = url + '/tree/HEAD'
app.IssueTracker = url + '/issues' app.IssueTracker = url + '/issues'
elif url.startswith('https://bitbucket.org/'): elif url.startswith('https://bitbucket.org/'):