mirror of
https://github.com/actions/github-script.git
synced 2026-04-07 14:49:25 +00:00
Merge branch 'main' into joshmgross/node-20
This commit is contained in:
commit
5349cf9965
7 changed files with 52 additions and 4 deletions
|
|
@ -7,7 +7,7 @@ import * as io from '@actions/io'
|
|||
|
||||
const AsyncFunction = Object.getPrototypeOf(async () => null).constructor
|
||||
|
||||
type AsyncFunctionArguments = {
|
||||
export declare type AsyncFunctionArguments = {
|
||||
context: Context
|
||||
core: typeof core
|
||||
github: InstanceType<typeof GitHub>
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ main().catch(handleError)
|
|||
type Options = {
|
||||
log?: Console
|
||||
userAgent?: string
|
||||
baseUrl?: string
|
||||
previews?: string[]
|
||||
retry?: RetryOptions
|
||||
request?: RequestRequestOptions
|
||||
|
|
@ -27,6 +28,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')
|
||||
|
|
@ -42,7 +44,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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue