File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed
Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -121,18 +121,16 @@ export class UiProvider implements vscode.WebviewViewProvider {
121121 if ( config . githubUrl ) {
122122 let apiUrl = "https://api.github.com" ;
123123
124- if ( config . githubUrl ) {
125- if ( config . githubUrl === "github.com" || config . githubUrl === "https://github.com" ) {
126- apiUrl = "https://api.github.com" ;
127- } else {
128- // Remove https:// prefix if present
129- const cleanUrl = config . githubUrl . replace ( / ^ h t t p s ? : \/ \/ / , '' ) ;
130-
131- // For GitHub Enterprise, convert to API URL format
132- apiUrl = `https://${ cleanUrl } ` ;
133- if ( ! apiUrl . includes ( '/api/v3' ) ) {
134- apiUrl = apiUrl . endsWith ( '/' ) ? `${ apiUrl } api/v3` : `${ apiUrl } /api/v3` ;
135- }
124+ if ( config . githubUrl === "github.com" || config . githubUrl === "https://github.com" ) {
125+ apiUrl = "https://api.github.com" ;
126+ } else {
127+ // Remove https:// prefix if present
128+ const cleanUrl = config . githubUrl . replace ( / ^ h t t p s ? : \/ \/ / , '' ) ;
129+
130+ // For GitHub Enterprise, convert to API URL format
131+ apiUrl = `https://${ cleanUrl } ` ;
132+ if ( ! apiUrl . includes ( '/api/v3' ) ) {
133+ apiUrl = apiUrl . endsWith ( '/' ) ? `${ apiUrl } api/v3` : `${ apiUrl } /api/v3` ;
136134 }
137135 }
138136
You can’t perform that action at this time.
0 commit comments