File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -316,8 +316,16 @@ export class PullRequestModel extends IssueModel<PullRequest> implements IPullRe
316
316
317
317
this . hasPendingReview = false ;
318
318
await this . updateDraftModeContext ( ) ;
319
+ const reviewEvent = parseGraphQLReviewEvent ( data ! . submitPullRequestReview . pullRequestReview , this . githubRepository ) ;
319
320
320
- return parseGraphQLReviewEvent ( data ! . submitPullRequestReview . pullRequestReview , this . githubRepository ) ;
321
+ const threadWithComment = this . _reviewThreadsCache . find ( thread =>
322
+ thread . comments . length ? ( thread . comments [ 0 ] . pullRequestReviewId === reviewEvent . id ) : undefined ,
323
+ ) ;
324
+ if ( threadWithComment ) {
325
+ threadWithComment . comments = reviewEvent . comments ;
326
+ this . _onDidChangeReviewThreads . fire ( { added : [ ] , changed : [ threadWithComment ] , removed : [ ] } ) ;
327
+ }
328
+ return reviewEvent ;
321
329
} else {
322
330
throw new Error ( `Submitting review failed, no pending review for current pull request: ${ this . number } .` ) ;
323
331
}
You can’t perform that action at this time.
0 commit comments