Adding baseUrl for GHE auth

This commit is contained in:
Leo Giovanetti
2021-12-03 18:47:02 -03:00
parent 8178b36b5a
commit 71cd64f865
9 changed files with 1349 additions and 8107 deletions
+3 -1
View File
@@ -8,6 +8,7 @@ import {fillAdditionalPlaceholders} from './transform'
export class ReleaseNotesBuilder {
constructor(
private baseUrl: string | null,
private token: string | null,
private repositoryPath: string,
private owner: string | null,
@@ -40,7 +41,8 @@ export class ReleaseNotesBuilder {
// load octokit instance
const octokit = new Octokit({
auth: `token ${this.token || process.env.GITHUB_TOKEN}`
auth: `token ${this.token || process.env.GITHUB_TOKEN}`,
baseUrl: `${this.baseUrl || "https://api.github.com"}`
})
// ensure proper from <-> to tag range