File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -331,9 +331,14 @@ export class PullRequestModel extends IssueModel<PullRequest> implements IPullRe
331331 * @param body The summary comment text.
332332 */
333333 async submitReview ( event ?: ReviewEvent , body ?: string ) : Promise < CommonReviewEvent > {
334- const pendingReviewId = await this . getPendingReviewId ( ) ;
334+ let pendingReviewId = await this . getPendingReviewId ( ) ;
335335 const { mutate, schema } = await this . githubRepository . ensure ( ) ;
336336
337+ if ( ! pendingReviewId && ( event === ReviewEvent . Comment ) ) {
338+ // Create a new review so that we can comment on it.
339+ pendingReviewId = await this . startReview ( ) ;
340+ }
341+
337342 if ( pendingReviewId ) {
338343 const { data } = await mutate < SubmitReviewResponse > ( {
339344 mutation : schema . SubmitReview ,
You can’t perform that action at this time.
0 commit comments