def _get_user_repo(url):
    """
        Return the :user/:repo/ from a github.com url
    """
    if url.find('://github.com/') > -1:  # toplevel GitHub page
        p = url.split('/')
        return '%s/%s' % (p[3], p[4].replace('.git', ''))
    elif url.find('.github.com/') > -1:  # GitHub project pages
        p = url.split('/')
        u = p[2].split('.')[0]
        return '%s/%s' % (u, p[3])

    return None