@@ -28,18 +28,18 @@ class GitLabApiUrlData(CommonGitLabUrlData):
2828 api_endpoint : str
2929
3030
31- def extract_data_from_natural_url (url ) -> GitLabNaturalUrlData :
31+ def extract_data_from_raw_url (url ) -> GitLabNaturalUrlData :
3232 """
3333 Take api style url and extract data
34- Sample Natural url: "http://192.168.85.26/quali_natti/terraformstuff/-/tree/test-branch/rds"
34+ Sample Raw Browser url: "http://192.168.85.26/quali_natti/terraformstuff/-/tree/test-branch/rds"
3535 """
3636
3737 pattern = (r'^(?P<protocol>https?)://(?P<domain>[^/]+)/(?P<user>[^/]+)/(?P<project>[^/]+)/'
3838 r'(-/tree/(?P<branch>[^/]+))?(?P<path>/.*)?$' )
3939
4040 match = re .match (pattern , url )
4141 if not match :
42- raise ValueError (f"No GitLab Natural URL match found for url '{ url } '" )
42+ raise ValueError (f"No GitLab URL Data found in RAW url '{ url } '" )
4343
4444 groups = match .groupdict ()
4545 return GitLabNaturalUrlData (protocol = groups ['protocol' ],
@@ -62,7 +62,7 @@ def extract_data_from_api_url(url) -> GitLabApiUrlData:
6262
6363 match = re .match (pattern , url )
6464 if not match :
65- raise ValueError (f"No GitLab API URL match found for url '{ url } '" )
65+ raise ValueError (f"No GitLab url data found in API url '{ url } '" )
6666
6767 groups = match .groupdict ()
6868 return GitLabApiUrlData (protocol = groups ['protocol' ],
@@ -101,7 +101,7 @@ def download_repo(self, url: str, token: str, branch: str = "") -> str:
101101 if is_api_url :
102102 url_data = extract_data_from_api_url (url )
103103 else :
104- url_data = extract_data_from_natural_url (url )
104+ url_data = extract_data_from_raw_url (url )
105105 is_https = True if url_data .protocol == "https" else False
106106 api_handler = GitlabApiHandler (host = url_data .domain , token = token , is_https = is_https )
107107 project_id = url_data .project_id if is_api_url else api_handler .get_project_id_from_name (url_data .project_name )
0 commit comments