chore: use input api url (#1293)
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
@@ -258,7 +258,9 @@ export const getChangedFilesFromGithubAPI = async ({
|
||||
inputs: Inputs
|
||||
env: Env
|
||||
}): Promise<ChangedFiles> => {
|
||||
const octokit = github.getOctokit(inputs.token)
|
||||
const octokit = github.getOctokit(inputs.token, {
|
||||
baseUrl: inputs.apiUrl
|
||||
})
|
||||
const changedFiles: ChangedFiles = {
|
||||
[ChangeTypeEnum.Added]: [],
|
||||
[ChangeTypeEnum.Copied]: [],
|
||||
@@ -283,7 +285,7 @@ export const getChangedFilesFromGithubAPI = async ({
|
||||
RestEndpointMethodTypes['pulls']['listFiles']['response']['data'][0]
|
||||
>(options)
|
||||
|
||||
core.info(`Got ${paginatedResponse.length} changed files from GitHub API`)
|
||||
core.info(`Found ${paginatedResponse.length} changed files from GitHub API`)
|
||||
const statusMap: Record<string, ChangeTypeEnum> = {
|
||||
added: ChangeTypeEnum.Added,
|
||||
removed: ChangeTypeEnum.Deleted,
|
||||
|
||||
@@ -39,7 +39,7 @@ export type Inputs = {
|
||||
recoverDeletedFiles: boolean
|
||||
recoverDeletedFilesToDestination: string
|
||||
token: string
|
||||
api_url: string
|
||||
apiUrl: string
|
||||
}
|
||||
|
||||
export const getInputs = (): Inputs => {
|
||||
@@ -153,7 +153,7 @@ export const getInputs = (): Inputs => {
|
||||
{required: false}
|
||||
)
|
||||
const token = core.getInput('token', {required: false})
|
||||
const api_url = core.getInput('api_url', {required: false})
|
||||
const apiUrl = core.getInput('api_url', {required: false})
|
||||
|
||||
const inputs: Inputs = {
|
||||
files,
|
||||
@@ -194,7 +194,7 @@ export const getInputs = (): Inputs => {
|
||||
outputDir,
|
||||
outputRenamedFilesAsDeletedAndAdded,
|
||||
token,
|
||||
api_url
|
||||
apiUrl
|
||||
}
|
||||
|
||||
if (fetchDepth) {
|
||||
|
||||
Reference in New Issue
Block a user