fix: redact Gitea web links from PR/issue MCP tool output (#125) #133

Merged
sysadmin merged 2 commits from feat/issue-125-pr-url-redaction into master 2026-07-04 16:44:24 -05:00
Showing only changes of commit c349b98206 - Show all commits
+5 -1
View File
@@ -56,7 +56,11 @@ def _reveal_endpoints() -> bool:
def _with_optional_url(result: dict, url: str | None) -> dict:
"""Attach web links only under the explicit endpoint reveal opt-in."""
"""Attach web links only under the explicit endpoint reveal opt-in.
Mutates *result* in place and returns it; pass a freshly-built dict,
never a shared/aliased one.
"""
if _reveal_endpoints() and url:
result["url"] = url
return result