else:
gitrepo.remotes[name].update({git_type: url})
# this would also be helpful, but is not yet included in git lib
- repo_name = gitrepo.remotes['origin']['fetch'].split('/')[-1].strip('.git')
+ repo_name = re.sub('\.git$', '', gitrepo.remotes['origin']['fetch'].split('/')[-1])
else:
- repo_name = gitrepo.remotes.origin.url.split('/')[-1].strip('.git')
+ repo_name = re.sub('\.git$', '', gitrepo.remotes['origin'].url.split('/')[-1])
logger.info('Remotes: %s' % gitrepo.remotes)
logger.info('Repository Name: %s' % repo_name)