Issue and MR duplicate comment, ref and author-or-write logic #110

closed cmc opened this on 2026-09-03 05:14 UTC · control · milestone v1.10.0

Discussion

cmc 2026-09-03 05:14 UTC

runIssueComment (issue.go:300) and runMRComment (mr.go:727) are the same 55 lines with the noun swapped. So are issueRef/mrRef, the --state filter parsing in both list commands, the commentOut struct declared in issue.go:268 and mr.go:504, and the author-or-write check at issue.go:377, :469, mr.go:659, :687, :1269 plus the copy in accounts.go.

Remedy: a commentTarget interface and one authorOrWrite(c, repo, author) helper.

closed by commit 37841c7286 by cmc: control: issues and merge requests share their thread code

2026-09-04 01:17 UTC