Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fbe453a

Browse filesBrowse files
committed
Transform inputs from strings
1 parent e694403 commit fbe453a
Copy full SHA for fbe453a

File tree

2 files changed

+4
-4
lines changed
Filter options

2 files changed

+4
-4
lines changed

‎action.yml

Copy file name to clipboardExpand all lines: action.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ inputs:
1717
description: An optional user-agent string
1818
default: actions/github-script
1919
previews:
20-
description: A list of API previews to accept
20+
description: A comma-separated list of API previews to accept
2121
outputs:
2222
result:
2323
description: The return value of the script, stringified with `JSON.stringify`

‎main.js

Copy file name to clipboardExpand all lines: main.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ async function main() {
1111
const userAgent = core.getInput('user-agent')
1212
const previews = core.getInput('previews')
1313
const opts = {}
14-
if (debug) opts.log = console
15-
if (userAgent) opts.userAgent = userAgent
16-
if (previews) opts.previews = previews
14+
if (debug === 'true') opts.log = console
15+
if (userAgent != null) opts.userAgent = userAgent
16+
if (previews != null) opts.previews = previews.split(',')
1717
const client = new GitHub(token, opts)
1818
const script = core.getInput('script', {required: true})
1919
const fn = new AsyncFunction('github', 'context', script)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.