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 @@ -1196,18 +1196,16 @@ export class UiProvider implements vscode.WebviewViewProvider {
1196
1196
// Convert web URL to API URL
1197
1197
let apiUrl = "https://api.github.com" ; // Default API URL
1198
1198
1199
- if ( url ) {
1200
- if ( url === "github.com" || url === "https://github.com" ) {
1201
- apiUrl = "https://api.github.com" ;
1202
- } else {
1203
- // Remove https:// prefix if present
1204
- const cleanUrl = url . replace ( / ^ h t t p s ? : \/ \/ / , '' ) ;
1205
-
1206
- // For GitHub Enterprise, convert to API URL
1207
- apiUrl = `https://${ cleanUrl } ` ;
1208
- if ( ! apiUrl . includes ( '/api/v3' ) ) {
1209
- apiUrl = apiUrl . endsWith ( '/' ) ? `${ apiUrl } api/v3` : `${ apiUrl } /api/v3` ;
1210
- }
1199
+ if ( url === "github.com" || url === "https://github.com" ) {
1200
+ apiUrl = "https://api.github.com" ;
1201
+ } else {
1202
+ // Remove https:// prefix if present
1203
+ const cleanUrl = url . replace ( / ^ h t t p s ? : \/ \/ / , '' ) ;
1204
+
1205
+ // For GitHub Enterprise, convert to API URL
1206
+ apiUrl = `https://${ cleanUrl } ` ;
1207
+ if ( ! apiUrl . includes ( '/api/v3' ) ) {
1208
+ apiUrl = apiUrl . endsWith ( '/' ) ? `${ apiUrl } api/v3` : `${ apiUrl } /api/v3` ;
1211
1209
}
1212
1210
}
1213
1211
You can’t perform that action at this time.
0 commit comments