File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ export type LaunchpadItem = LaunchpadPullRequest & {
109109
110110export type OpenRepository = {
111111 repo : Repository ;
112- remote : GitRemote ;
112+ remote ? : GitRemote ;
113113 localBranch ?: GitBranch ;
114114} ;
115115
@@ -551,12 +551,16 @@ export class LaunchpadProvider implements Disposable {
551551 ) : Promise < OpenRepository | undefined > {
552552 if ( pr . repoIdentity . remote . url == null ) return undefined ;
553553
554- const match =
555- matchingRemoteMap . get ( pr . repoIdentity . remote . url ) ??
556- ( pr . underlyingPullRequest ?. refs ?. base ?. url
557- ? matchingRemoteMap . get ( pr . underlyingPullRequest . refs . base . url )
558- : undefined ) ;
559- if ( match == null ) return undefined ;
554+ let match = matchingRemoteMap . get ( pr . repoIdentity . remote . url ) ;
555+ if ( match == null ) {
556+ if ( pr . underlyingPullRequest ?. refs ?. base ?. url == null ) return undefined ;
557+
558+ match = matchingRemoteMap . get ( pr . underlyingPullRequest . refs . base . url ) ;
559+ if ( match == null ) return undefined ;
560+
561+ const [ repo ] = match ;
562+ return { repo : repo } ;
563+ }
560564
561565 const [ repo , remote ] = match ;
562566
You can’t perform that action at this time.
0 commit comments