mirror of
https://github.com/actions/github-script.git
synced 2026-04-07 14:49:25 +00:00
Include @actions/io
This commit is contained in:
parent
048309c447
commit
b2c461f3a2
6 changed files with 517 additions and 4 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import * as core from '@actions/core'
|
||||
import {GitHub} from '@actions/github'
|
||||
import {Context} from '@actions/github/lib/context'
|
||||
import * as io from '@actions/io'
|
||||
|
||||
const AsyncFunction = Object.getPrototypeOf(async () => null).constructor
|
||||
|
||||
|
|
@ -8,6 +9,7 @@ type AsyncFunctionArguments = {
|
|||
context: Context
|
||||
core: typeof core
|
||||
github: GitHub
|
||||
io: typeof io
|
||||
require: NodeRequire
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import * as core from '@actions/core'
|
||||
import {context, GitHub} from '@actions/github'
|
||||
import * as io from '@actions/io'
|
||||
import {callAsyncFunction} from './async-function'
|
||||
|
||||
process.on('unhandledRejection', handleError)
|
||||
|
|
@ -27,7 +28,7 @@ async function main(): Promise<void> {
|
|||
|
||||
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilation errors.
|
||||
const result = await callAsyncFunction(
|
||||
{require: require, github, context, core},
|
||||
{require: require, github, context, core, io},
|
||||
script
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue