feat(parser): relax host validation to support self-hosted GitLab & git.* domains (#314)

• Accept hosts starting with “git.” or “gitlab.” in _looks_like_git_host
• Update doc-strings to document the heuristic
• Adjust git-host-agnostic tests: expect ValueError for slug form with
  custom hosts; add real GitLab instance (git.rwth-aachen.de) to matrix
This commit is contained in:
Filip Christiansen 2025-06-23 20:50:08 +02:00 committed by GitHub
parent 4ee598c406
commit e5fadce158
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 44 additions and 4 deletions

View file

@ -24,6 +24,9 @@ URLS_HTTPS: List[str] = [
"https://gitea.com/user/repo",
"https://codeberg.org/user/repo",
"https://gist.github.com/user/repo",
"https://git.example.com/user/repo",
"https://gitlab.example.com/user/repo",
"https://gitlab.example.se/user/repo",
]
URLS_HTTP: List[str] = [url.replace("https://", "http://") for url in URLS_HTTPS]