File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -82,11 +82,9 @@ def get_git_remotes(repo: Repo) -> list[str]:
8282def  get_repo_owner_and_name (repo : Repo  |  None  =  None , git_remote : str  |  None  =  "origin" ) ->  tuple [str , str ]:
8383    remote_url  =  get_remote_url (repo , git_remote )  # call only once 
8484    remote_url  =  remote_url .removesuffix (".git" ) if  remote_url .endswith (".git" ) else  remote_url 
85+     remote_url  =  remote_url .rstrip ("/" )
8586    split_url  =  remote_url .split ("/" )
86-     if  split_url [- 1 ] ==  "" :
87-         repo_owner_with_github , repo_name  =  split_url [- 3 ], split_url [- 2 ]
88-     else :
89-         repo_owner_with_github , repo_name  =  split_url [- 2 ], split_url [- 1 ]
87+     repo_owner_with_github , repo_name  =  split_url [- 2 ], split_url [- 1 ]
9088    repo_owner  =  repo_owner_with_github .split (":" )[1 ] if  ":"  in  repo_owner_with_github  else  repo_owner_with_github 
9189    return  repo_owner , repo_name 
9290
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments