mirror of
https://github.com/actions/github-script.git
synced 2026-02-07 19:47:26 +00:00
Transform inputs from strings
This commit is contained in:
parent
e6944039f8
commit
fbe453a850
2 changed files with 4 additions and 4 deletions
|
|
@ -17,7 +17,7 @@ inputs:
|
|||
description: An optional user-agent string
|
||||
default: actions/github-script
|
||||
previews:
|
||||
description: A list of API previews to accept
|
||||
description: A comma-separated list of API previews to accept
|
||||
outputs:
|
||||
result:
|
||||
description: The return value of the script, stringified with `JSON.stringify`
|
||||
|
|
|
|||
6
main.js
6
main.js
|
|
@ -11,9 +11,9 @@ async function main() {
|
|||
const userAgent = core.getInput('user-agent')
|
||||
const previews = core.getInput('previews')
|
||||
const opts = {}
|
||||
if (debug) opts.log = console
|
||||
if (userAgent) opts.userAgent = userAgent
|
||||
if (previews) opts.previews = previews
|
||||
if (debug === 'true') opts.log = console
|
||||
if (userAgent != null) opts.userAgent = userAgent
|
||||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue