MCPcopy Index your code
hub / github.com/FSoft-AI4Code/CodeWiki / _normalize_github_url

Method _normalize_github_url

codewiki/src/fe/routes.py:270–278  ·  view source on GitHub ↗

Normalize GitHub URL for consistent comparison.

(self, url: str)

Source from the content-addressed store, hash-verified

268 raise HTTPException(status_code=500, detail=f"Error reading {filename}: {e}\n{format_exc()}")
269
270 def _normalize_github_url(self, url: str) -> str:
271 """Normalize GitHub URL for consistent comparison."""
272 try:
273 # Get repo info to standardize the URL format
274 repo_info = GitHubRepoProcessor.get_repo_info(url)
275 return f"https://github.com/{repo_info['full_name']}"
276 except Exception:
277 # Fallback to basic normalization
278 return url.rstrip('/').lower()
279
280 def _repo_full_name_to_job_id(self, full_name: str) -> str:
281 """Convert repo full name to URL-safe job ID."""

Callers 1

index_postMethod · 0.95

Calls 1

get_repo_infoMethod · 0.80

Tested by

no test coverage detected