mirror of
https://github.com/actions/github-script.git
synced 2025-12-08 08:06:23 +00:00
add base-url option
This commit is contained in:
@@ -29,6 +29,9 @@ inputs:
|
||||
retry-exempt-status-codes:
|
||||
description: A comma separated list of status codes that will NOT be retried e.g. "400,500". No effect unless `retries` is set
|
||||
default: 400,401,403,404,422 # from https://github.com/octokit/plugin-retry.js/blob/9a2443746c350b3beedec35cf26e197ea318a261/src/index.ts#L14
|
||||
base-url:
|
||||
description: The root of the API URL of the GHES instance to which to connect.
|
||||
required: false
|
||||
outputs:
|
||||
result:
|
||||
description: The return value of the script, stringified with `JSON.stringify`
|
||||
|
||||
@@ -18,6 +18,7 @@ main().catch(handleError)
|
||||
type Options = {
|
||||
log?: Console
|
||||
userAgent?: string
|
||||
baseUrl?: string
|
||||
previews?: string[]
|
||||
retry?: RetryOptions
|
||||
request?: RequestRequestOptions
|
||||
@@ -28,6 +29,7 @@ async function main(): Promise<void> {
|
||||
const debug = core.getBooleanInput('debug')
|
||||
const userAgent = core.getInput('user-agent')
|
||||
const previews = core.getInput('previews')
|
||||
const baseUrl = core.getInput('base-url')
|
||||
const retries = parseInt(core.getInput('retries'))
|
||||
const exemptStatusCodes = parseNumberArray(
|
||||
core.getInput('retry-exempt-status-codes')
|
||||
@@ -43,7 +45,8 @@ async function main(): Promise<void> {
|
||||
userAgent: userAgent || undefined,
|
||||
previews: previews ? previews.split(',') : undefined,
|
||||
retry: retryOpts,
|
||||
request: requestOpts
|
||||
request: requestOpts,
|
||||
baseUrl: baseUrl || undefined
|
||||
}
|
||||
|
||||
const github = getOctokit(token, opts, retry, requestLog)
|
||||
|
||||
Reference in New Issue
Block a user