File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -75,18 +75,18 @@ export async function getGitHubUrls(): Promise<GitHubUrls[] | null> {
75
75
remote = [ r . state . remotes [ 0 ] ] ;
76
76
}
77
77
78
- if ( remote . length > 0 && remote [ 0 ] . pushUrl ) {
79
- const host = new URL ( remote [ 0 ] . pushUrl ) . host ;
80
- const apiUri = new URL ( getGitHubApiUri ( ) ) . host ;
81
- if ( host === "github.com" || ( useEnterprise ( ) && host === apiUri ) ) {
82
- const url = remote [ 0 ] . pushUrl ;
83
-
84
- return {
85
- workspaceUri : r . rootUri ,
86
- url ,
87
- protocol : new Protocol ( url )
88
- } ;
89
- }
78
+ if (
79
+ remote . length > 0 &&
80
+ ( remote [ 0 ] . pushUrl ?. indexOf ( "github.com" ) !== - 1 ||
81
+ ( useEnterprise ( ) && remote [ 0 ] . pushUrl ?. indexOf ( new URL ( getGitHubApiUri ( ) ) . host ) !== - 1 ) )
82
+ ) {
83
+ const url = remote [ 0 ] . pushUrl ;
84
+
85
+ return {
86
+ workspaceUri : r . rootUri ,
87
+ url,
88
+ protocol : new Protocol ( url as string )
89
+ } ;
90
90
}
91
91
92
92
logDebug ( `Remote "${ remoteName } " not found, skipping repository` ) ;
You can’t perform that action at this time.
0 commit comments