@@ -76,42 +76,19 @@ export class NotificationsDebugStore {
76
76
77
77
const ghRepository = repository . gitHubRepository
78
78
79
- const issueComments = await api . fetchPullRequestComments (
79
+ const issueComments = await api . fetchIssueComments (
80
80
ghRepository . owner . login ,
81
81
ghRepository . name ,
82
82
pullRequestNumber . toString ( )
83
83
)
84
84
85
- const issueCommentIds = new Set ( issueComments . map ( c => c . id ) )
86
-
87
- // Fetch review comments of type COMMENTED and with no body
88
- const allReviews = await api . fetchPullRequestReviews (
85
+ const reviewComments = await api . fetchPullRequestComments (
89
86
ghRepository . owner . login ,
90
87
ghRepository . name ,
91
88
pullRequestNumber . toString ( )
92
89
)
93
90
94
- const commentedReviewsWithNoBody = allReviews . filter (
95
- review => review . state === 'COMMENTED' && ! review . body
96
- )
97
-
98
- const allReviewComments = await Promise . all (
99
- commentedReviewsWithNoBody . map ( review =>
100
- api . fetchPullRequestReviewComments (
101
- ghRepository . owner . login ,
102
- ghRepository . name ,
103
- pullRequestNumber . toString ( ) ,
104
- review . id . toString ( )
105
- )
106
- )
107
- )
108
-
109
- // Only reviews with one comment, and that comment is not an issue comment
110
- const singleReviewComments = allReviewComments
111
- . flatMap ( comments => ( comments . length === 1 ? comments : [ ] ) )
112
- . filter ( comment => ! issueCommentIds . has ( comment . id ) )
113
-
114
- return [ ...issueComments , ...singleReviewComments ]
91
+ return [ ...issueComments , ...reviewComments ]
115
92
}
116
93
117
94
/** Simulate a notification for the given pull request review. */
0 commit comments