···373373 // get forks
374374 forksInClause := strings.TrimSuffix(strings.Repeat("?, ", len(repoMap)), ", ")
375375 forkArgs := make([]any, len(repoMap))
376376- repoDidMap := make(map[string]syntax.ATURI)
377377- i = 0
378378- for aturi, r := range repoMap {
379379- forkArgs[i] = r.RepoDid
380380- repoDidMap[r.RepoDid] = aturi
381381- i++
382382- }
383376384377 forksCountQuery := fmt.Sprintf(
385378 `select source, count(1) from repos where source in (%s) group by source`,
···400393 continue
401394 }
402395403403- atURI, ok := repoDidMap[repodid]
404404- if !ok {
405405- continue
406406- }
407407-408408- if r, ok := repoMap[atURI]; ok {
396396+ if r, ok := repoMap[repodid]; ok {
409397 r.RepoStats.ForkCount = count
410398 }
411399 }
+5-5
appview/db/vouch.go
···373373 select p.owner_did as did, 3 as priority, p.created,
374374 'This user opened a pull request on your repository' as reason
375375 from pulls p
376376- join repos r on r.at_uri = p.repo_at
376376+ join repos r on r.repo_did = p.repo_did
377377 where r.did = ?
378378 and p.owner_did != ?
379379···382382 select i.did as did, 4 as priority, i.created,
383383 'This user opened an issue on your repository' as reason
384384 from issues i
385385- join repos r on r.at_uri = i.repo_at
385385+ join repos r on r.repo_did = i.repo_did
386386 where r.did = ?
387387 and i.did != ?
388388···391391 select pc.owner_did as did, 5 as priority, pc.created,
392392 'This user commented on a pull request on your repository' as reason
393393 from pull_comments pc
394394- join repos r on r.at_uri = pc.repo_at
394394+ join repos r on r.repo_did = pc.repo_did
395395 where r.did = ?
396396 and pc.owner_did != ?
397397···401401 'This user commented on an issue on your repository' as reason
402402 from issue_comments ic
403403 join issues i on i.at_uri = ic.issue_at
404404- join repos r on r.at_uri = i.repo_at
404404+ join repos r on r.repo_did = i.repo_did
405405 where r.did = ?
406406 and ic.did != ?
407407···418418 select r.did as did, 8 as priority, s.created,
419419 'You recently starred a repository by this user' as reason
420420 from stars s
421421- join repos r on r.at_uri = s.subject_at
421421+ join repos r on r.at_uri = s.subject
422422 where s.did = ?
423423 and r.did != ?
424424 )