Merge pull request #2206 from radhajain/enable-github-issues-enterprise
Enable custom domains for Github Issue provider
This commit is contained in:
commit
04fdfa0075
2 changed files with 22 additions and 0 deletions
|
|
@ -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,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue