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
331
331
* @param body The summary comment text.
332
332
*/
333
333
async submitReview ( event ?: ReviewEvent , body ?: string ) : Promise < CommonReviewEvent > {
334
- const pendingReviewId = await this . getPendingReviewId ( ) ;
334
+ let pendingReviewId = await this . getPendingReviewId ( ) ;
335
335
const { mutate, schema } = await this . githubRepository . ensure ( ) ;
336
336
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
+
337
342
if ( pendingReviewId ) {
338
343
const { data } = await mutate < SubmitReviewResponse > ( {
339
344
mutation : schema . SubmitReview ,
You can’t perform that action at this time.
0 commit comments