File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,17 @@ main().catch(handleError)
66
77async function main ( ) {
88 const AsyncFunction = Object . getPrototypeOf ( async ( ) => { } ) . constructor
9- const script = core . getInput ( 'script' , { required : true } )
109 const token = core . getInput ( 'github-token' , { required : true } )
10+ const debug = core . getInput ( 'debug' )
11+ const userAgent = core . getInput ( 'user-agent' )
12+ const previews = core . getInput ( 'previews' )
13+ const opts = { }
14+ if ( debug ) opts . log = console
15+ if ( userAgent ) opts . userAgent = userAgent
16+ if ( previews ) opts . previews = previews
17+ const client = new GitHub ( token , opts )
18+ const script = core . getInput ( 'script' , { required : true } )
1119 const fn = new AsyncFunction ( 'github' , 'context' , script )
12- const client = new GitHub ( token )
1320 const result = await fn ( client , context )
1421 core . setOutput ( 'result' , JSON . stringify ( result ) )
1522}
You can’t perform that action at this time.
0 commit comments