Skip to content

Commit 09c1385

Browse files
GeekMasherCopilot
andauthored
Update src/providers/uiProvider.ts
Co-authored-by: Copilot <[email protected]>
1 parent 3ad7273 commit 09c1385

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

src/providers/uiProvider.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,18 +1196,16 @@ export class UiProvider implements vscode.WebviewViewProvider {
11961196
// Convert web URL to API URL
11971197
let apiUrl = "https://api.github.com"; // Default API URL
11981198

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(/^https?:\/\//, '');
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(/^https?:\/\//, '');
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`;
12111209
}
12121210
}
12131211

0 commit comments

Comments
 (0)