File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -741,11 +741,10 @@ export function registerCommands(
741741 pullRequestModel = resolved ?. pr ;
742742 }
743743 else if ( contextHasPath ( pr ) ) {
744- // looks like '/123' where 123 is the PR number
745744 const { path } = pr ;
746- const prNumber = Number ( path . startsWith ( '/' ) ? path . substring ( 1 ) : path ) ;
747- if ( Number . isNaN ( prNumber ) ) {
748- return vscode . window . showErrorMessage ( vscode . l10n . t ( 'Unable to parse pull request number.' ) ) ;
745+ const prNumber = prNumberFromUriPath ( path ) ;
746+ if ( ! prNumber ) {
747+ return vscode . window . showErrorMessage ( vscode . l10n . t ( 'No pull request number found in context path .' ) ) ;
749748 }
750749 const folderManager = reposManager . folderManagers [ 0 ] ;
751750 const pullRequest = await folderManager . fetchById ( folderManager . gitHubRepositories [ 0 ] , Number ( prNumber ) ) ;
You can’t perform that action at this time.
0 commit comments