From 5f159fbd81c4b8680cbad8b3875aa54e2079928e Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 19 Nov 2024 11:26:25 -0800 Subject: [PATCH 1/2] fix: remove unnecessary baseUrl --- core/context/providers/GitHubIssuesContextProvider.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/context/providers/GitHubIssuesContextProvider.ts b/core/context/providers/GitHubIssuesContextProvider.ts index ef34ad621..c0f25c12b 100644 --- a/core/context/providers/GitHubIssuesContextProvider.ts +++ b/core/context/providers/GitHubIssuesContextProvider.ts @@ -21,11 +21,9 @@ class GitHubIssuesContextProvider extends BaseContextProvider { ): Promise { const issueId = query; const { Octokit } = await import("@octokit/rest"); - const domain = this.options?.domain ?? "github.com"; const octokit = new Octokit({ auth: this.options?.githubToken, - baseUrl: `https://${domain}/api/v3`, request: { fetch: extras.fetch, }, From 3f7daee8f30ee241cdf19cb16589865509c2e424 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 19 Nov 2024 21:56:53 -0800 Subject: [PATCH 2/2] restore domain --- core/context/providers/GitHubIssuesContextProvider.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/context/providers/GitHubIssuesContextProvider.ts b/core/context/providers/GitHubIssuesContextProvider.ts index c0f25c12b..7bd64d860 100644 --- a/core/context/providers/GitHubIssuesContextProvider.ts +++ b/core/context/providers/GitHubIssuesContextProvider.ts @@ -24,6 +24,9 @@ class GitHubIssuesContextProvider extends BaseContextProvider { const octokit = new Octokit({ auth: this.options?.githubToken, + baseUrl: this.options?.domain + ? `https://${this.options.domain}/api/v3` + : undefined, request: { fetch: extras.fetch, },