mirror of
https://github.com/actions/github-script.git
synced 2026-02-07 19:47:26 +00:00
Pass "require" to function context
This commit is contained in:
parent
d910cb8d03
commit
71fcc9050d
1 changed files with 2 additions and 2 deletions
4
main.js
4
main.js
|
|
@ -16,8 +16,8 @@ async function main() {
|
|||
if (previews != null) opts.previews = previews.split(',')
|
||||
const client = new GitHub(token, opts)
|
||||
const script = core.getInput('script', {required: true})
|
||||
const fn = new AsyncFunction('github', 'context', script)
|
||||
const result = await fn(client, context)
|
||||
const fn = new AsyncFunction('require', 'github', 'context', script)
|
||||
const result = await fn(require, client, context)
|
||||
core.setOutput('result', JSON.stringify(result))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue