fix: defined repo_name replaced with host name (#205)

A logic error caused a defined `repo_name` to be overwritten by the host name from the `repo_url`.

Signed-off-by: alexvoss <alex@corealization.com>
This commit is contained in:
alexvoss
2025-12-18 11:34:59 -05:00
parent a39300ee3b
commit 05feb1e5dd
+5 -4
View File
@@ -171,10 +171,11 @@ def _apply_defaults(config: dict, path: str) -> dict:
repo_url = config.get("repo_url")
if repo_url:
host = urlparse(repo_url).hostname or ""
if not config.get("repo_name") and host in repo_names:
set_default(config, "repo_name", repo_names[host], str)
elif host:
config["repo_name"] = host.split(".")[0].title()
if not config.get("repo_name"):
if host in repo_names:
set_default(config, "repo_name", repo_names[host], str)
elif host:
config["repo_name"] = host.split(".")[0].title()
if host in edit_uris:
set_default(config, "edit_uri", edit_uris[host], str)