From b1cf53587dfc7f2417920dabff18373154eb91a0 Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Sun, 24 May 2026 16:20:36 +0000 Subject: [PATCH] appview/db: fix comments query in `GetVouchSuggestions` Signed-off-by: Seongmin Lee --- appview/db/vouch.go | 17 +++++++++-------- 1 file(s) changed, 9 insertion(s)(+), 8 deletion(s)(-) diff --git a/appview/db/vouch.go b/appview/db/vouch.go --- a/appview/db/vouch.go +++ b/appview/db/vouch.go @@ -388,22 +388,23 @@ union all - select pc.owner_did as did, 5 as priority, pc.created, + select c.did as did, 5 as priority, c.created, 'This user commented on a pull request on your repository' as reason - from pull_comments pc - join repos r on r.repo_did = pc.repo_did + from comments c + join pulls p on p.at_uri = c.subject_uri + join repos r on r.repo_did = p.repo_did where r.did = ? - and pc.owner_did != ? + and c.did != ? union all - select ic.did as did, 6 as priority, ic.created, + select c.did as did, 6 as priority, c.created, 'This user commented on an issue on your repository' as reason - from issue_comments ic - join issues i on i.at_uri = ic.issue_at + from comments c + join issues i on i.at_uri = c.subject_uri join repos r on r.repo_did = i.repo_did where r.did = ? - and ic.did != ? + and c.did != ? union all -- tangled.sh