fix: redact Gitea web links from PR/issue MCP tool output (#125) #133
+5
-1
@@ -56,7 +56,11 @@ def _reveal_endpoints() -> bool:
|
|||||||
|
|
||||||
|
|
||||||
def _with_optional_url(result: dict, url: str | None) -> dict:
|
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:
|
if _reveal_endpoints() and url:
|
||||||
result["url"] = url
|
result["url"] = url
|
||||||
return result
|
return result
|
||||||
|
|||||||
Reference in New Issue
Block a user