fix: bind issue comments to explicit worktree path (Closes #560)

Merge PR #561 — bind issue comments to explicit worktree path (Closes #560).
This commit was merged in pull request #561.
This commit is contained in:
2026-07-08 21:09:01 -05:00
2 changed files with 260 additions and 1 deletions
+3 -1
View File
@@ -6168,6 +6168,7 @@ def gitea_create_issue_comment(
host: str | None = None,
org: str | None = None,
repo: str | None = None,
worktree_path: str | None = None,
) -> dict:
"""Post a markdown comment to a Gitea issue's discussion thread.
@@ -6189,6 +6190,7 @@ def gitea_create_issue_comment(
host: Override the Gitea host.
org: Override the owner/organization.
repo: Override the repository name.
worktree_path: Optional path to verify branches-only guard.
Returns:
dict with 'success', 'comment_id', and 'issue_number' ('url' only
@@ -6197,7 +6199,7 @@ def gitea_create_issue_comment(
(permission blocks also carry a structured 'permission_report',
#142).
"""
verify_preflight_purity(remote, task="comment_issue")
verify_preflight_purity(remote, worktree_path=worktree_path, task="comment_issue")
gate_reasons = _profile_operation_gate("gitea.issue.comment")
reasons = list(gate_reasons)
if not (body or "").strip():