[FIX] runbot: remove trailing '.git' in repo base

The base field is used to compose URL (e.g. "https://%s/pulls" % repo.base).
The URL given by github can contains trailing '.git' so this should be removed.
This commit is contained in:
Sandy Carter 2014-10-27 11:30:23 -04:00 committed by Martin Trigaux
parent 3da19f47b7
commit 15870dcc7e

View File

@ -169,6 +169,7 @@ class runbot_repo(osv.osv):
result = {}
for repo in self.browse(cr, uid, ids, context=context):
name = re.sub('.+@', '', repo.name)
name = re.sub('.git$', '', name)
name = name.replace(':','/')
result[repo.id] = name
return result