feat(config): external gitea_public_url for clickable doc links

This commit is contained in:
Dev Agent
2026-06-03 22:58:18 +03:00
parent dce9ac806b
commit ca63bc26bb
3 changed files with 30 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ class Settings(BaseSettings):
# Gitea
gitea_url: str = "http://localhost:3000"
gitea_public_url: str = "" # external URL for clickable links in comments; falls back to gitea_url
gitea_token: str = ""
gitea_webhook_secret: str = ""
gitea_owner: str = "admin"

View File

@@ -296,7 +296,7 @@ def _build_analyst_ready_comment(repo: str, work_item_id: str, branch: str) -> s
wt_dir = None
owner = getattr(settings, "gitea_owner", "admin")
base = settings.gitea_url.rstrip("/")
base = (getattr(settings, "gitea_public_url", "") or settings.gitea_url).rstrip("/")
links = []
for label, fname in candidates:
if wt_dir and not os.path.isfile(os.path.join(wt_dir, fname)):