pullrequest.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:github-reviewboard-sync 作者: Apptimize-OSS 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号