def _get_org_and_name_from_remote(remote):
"""
Gets the org name and the repo name
for a github remote.
:param git.Remote remote:
:return: The owner and the repo name in that order
:rtype: unicode, unicode
"""
url = remote.config_reader.get('url')
if not url.endswith('.git'):
url = '{0}.git'.format(url)
git_info = parse(url)
_LOG.debug('Repo owner: "{0}"'.format(git_info.owner))
_LOG.debug('Repo name: "{0}"'.format(git_info.repo))
return git_info.owner, git_info.repo
pullrequest.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录