Adding baseUrl for GHE auth
This commit is contained in:
@@ -24,6 +24,7 @@ async function run(): Promise<void> {
|
||||
)
|
||||
|
||||
// read in repository inputs
|
||||
const baseUrl = core.getInput('baseUrl')
|
||||
const token = core.getInput('token')
|
||||
const owner = core.getInput('owner') || github.context.repo.owner
|
||||
const repo = core.getInput('repo') || github.context.repo.repo
|
||||
@@ -36,6 +37,7 @@ async function run(): Promise<void> {
|
||||
const commitMode = core.getInput('commitMode') === 'true'
|
||||
|
||||
const result = await new ReleaseNotesBuilder(
|
||||
baseUrl,
|
||||
token,
|
||||
repositoryPath,
|
||||
owner,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user