@@ -82,11 +82,11 @@ def _get_owner_and_repo_path(self, given_url: str) -> str:
8282 return ""
8383
8484 def get_git_repo_url (self , issues_or_pr_url : str ) -> str :
85- repo_path = self ._get_owner_and_repo_path (issues_or_pr_url )
85+ repo_path = self ._get_owner_and_repo_path (issues_or_pr_url ) #Return: <OWNER>/<REPO>
8686 if not repo_path or repo_path not in issues_or_pr_url :
8787 get_logger ().error (f"Unable to retrieve owner/path from url: { issues_or_pr_url } " )
8888 return ""
89- return f"{ issues_or_pr_url . split ( repo_path )[ 0 ] } { repo_path } .git"
89+ return f"{ self . base_url_html } / { repo_path } .git" #https://github.com / <OWNER>/<REPO>.git
9090
9191 # Given a git repo url, return prefix and suffix of the provider in order to view a given file belonging to that repo.
9292 # Example: https://github.com/qodo-ai/pr-agent.git and branch: v0.8 -> prefix: "https://github.com/qodo-ai/pr-agent/blob/v0.8", suffix: ""
@@ -109,7 +109,7 @@ def get_canonical_url_parts(self, repo_git_url:str, desired_branch:str) -> Tuple
109109 owner , repo = self .repo .split ('/' )
110110 scheme_and_netloc = self .base_url_html
111111 desired_branch = self .get_pr_branch ()
112- if not any ([scheme_and_netloc , owner , repo ]): #"else": Not invoked from a PR context,but no provided git url for context
112+ if not all ([scheme_and_netloc , owner , repo ]): #"else": Not invoked from a PR context,but no provided git url for context
113113 get_logger ().error (f"Unable to get canonical url parts since missing context (PR or explicit git url)" )
114114 return ("" , "" )
115115
0 commit comments