sgallagh / centos / centpkg

Forked from centos/centpkg 3 years ago
Clone

ad46d3 Fix autodetection of repo name with SSH remote

Authored and Committed by sgallagh 3 months ago
    Fix autodetection of repo name with SSH remote
    
    There are two valid forms of SSH protocol git remotes, but we were only
    expecting the [git+]ssh:// form. The urllib.parse.urlparse() routine was
    thus failing to determine the scheme and was treating the entire URL as
    the path to pass to the Gitlab API. As a result, it was throwing a 404
    exception that we were catching and ignoring.
    
    This patch checks for a missing scheme component and if it finds one, it
    transfers the remote into the other URL form for parsing purposes.
    
    Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
    
        
file modified
+12 -3