Merge pull request #2206 from radhajain/enable-github-issues-enterprise

Enable custom domains for Github Issue provider
This commit is contained in:
Nate Sesti 2024-09-09 20:44:34 -07:00 • committed by GitHub
commit 04fdfa0075
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 0 deletions

View file

@ -21,9 +21,11 @@ class GitHubIssuesContextProvider extends BaseContextProvider {
): Promise<ContextItem[]> {
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,
},

View file

@ -138,6 +138,26 @@ Type '@issue' to reference the conversation in a GitHub issue. Make sure to incl
}
```
#### Using Github Enterprise Server
When using with Github Enterprise Server, you can set the `domain` parameter to your server's hostname. By default this is set to `github.com`.
```json
{
"name": "issue",
"params": {
"repos": [
{
"owner": "continuedev",
"repo": "continue"
}
],
"githubToken": "ghp_xxx",
"domain": "github.acme-inc.com"
}
}
```
### GitLab Merge Request
Type `@gitlab-mr` to reference an open MR for this branch on GitLab.