File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -657,15 +657,27 @@ export class PullRequestOverviewPanel extends IssueOverviewPanel<PullRequestMode
657657 const readyResult = await this . _item . setReadyForReview ( ) ;
658658
659659 // Step 2: Approve the PR
660- await this . _item . approve ( this . _folderRepositoryManager . repository , '' ) ;
660+ try {
661+ await this . _item . approve ( this . _folderRepositoryManager . repository , '' ) ;
662+ } catch ( e ) {
663+ vscode . window . showErrorMessage ( `Pull request marked as ready for review, but failed to approve. ${ formatError ( e ) } ` ) ;
664+ this . _replyMessage ( message , readyResult ) ;
665+ return ;
666+ }
661667
662668 // Step 3: Enable auto-merge
663- await this . _item . enableAutoMerge ( message . args . mergeMethod ) ;
669+ try {
670+ await this . _item . enableAutoMerge ( message . args . mergeMethod ) ;
671+ } catch ( e ) {
672+ vscode . window . showErrorMessage ( `Pull request marked as ready and approved, but failed to enable auto-merge. ${ formatError ( e ) } ` ) ;
673+ this . _replyMessage ( message , readyResult ) ;
674+ return ;
675+ }
664676
665677 // Return the ready result to update the UI
666678 this . _replyMessage ( message , readyResult ) ;
667679 } catch ( e ) {
668- vscode . window . showErrorMessage ( `Unable to mark ready for review and merge . ${ formatError ( e ) } ` ) ;
680+ vscode . window . showErrorMessage ( `Unable to mark pull request as ready for review. ${ formatError ( e ) } ` ) ;
669681 this . _throwError ( message , '' ) ;
670682 }
671683 }
You can’t perform that action at this time.
0 commit comments