@@ -43,7 +43,9 @@ class Extension {
4343 vscode . commands . registerCommand ( 'vscode-github.createPullRequest' , this . wrapCommand ( this . createPullRequest ) ) ,
4444 vscode . commands . registerCommand ( 'vscode-github.checkoutPullRequests' ,
4545 this . wrapCommand ( this . checkoutPullRequests ) ) ,
46- vscode . commands . registerCommand ( 'vscode-github.browserPullRequest' , this . wrapCommand ( this . browserPullRequest ) ) ,
46+ vscode . commands . registerCommand ( 'vscode-github.browserSimplePullRequest' ,
47+ this . wrapCommand ( this . browseSimplePullRequest ) ) ,
48+ vscode . commands . registerCommand ( 'vscode-github.browserPullRequest' , this . wrapCommand ( this . browsePullRequest ) ) ,
4749 vscode . commands . registerCommand ( 'vscode-github.mergePullRequest' , this . wrapCommand ( this . mergePullRequest ) ) ,
4850 vscode . commands . registerCommand ( 'vscode-github.addAssignee' , this . wrapCommand ( this . addAssignee ) ) ,
4951 vscode . commands . registerCommand ( 'vscode-github.removeAssignee' , this . wrapCommand ( this . removeAssignee ) ) ,
@@ -231,7 +233,18 @@ class Extension {
231233 } ) ;
232234 }
233235
234- private async browserPullRequest ( ) : Promise < void > {
236+ private async browseSimplePullRequest ( ) : Promise < void > {
237+ await this . withinProgressUI ( async ( ) => {
238+ const pullRequest = await this . githubManager . getPullRequestForCurrentBranch ( ) ;
239+ if ( pullRequest ) {
240+ await vscode . commands . executeCommand ( 'vscode.open' , vscode . Uri . parse ( pullRequest . html_url ) ) ;
241+ } else {
242+ vscode . window . showInformationMessage ( 'No pull request for current branch found' ) ;
243+ }
244+ } ) ;
245+ }
246+
247+ private async browsePullRequest ( ) : Promise < void > {
235248 this . selectPullRequest ( pullRequest => {
236249 vscode . commands . executeCommand ( 'vscode.open' , vscode . Uri . parse ( pullRequest . html_url ) ) ;
237250 } ) ;
0 commit comments