File tree 1 file changed +9
-2
lines changed
Filter options
1 file changed +9
-2
lines changed
Original file line number Diff line number Diff line change @@ -6,10 +6,17 @@ main().catch(handleError)
6
6
7
7
async function main ( ) {
8
8
const AsyncFunction = Object . getPrototypeOf ( async ( ) => { } ) . constructor
9
- const script = core . getInput ( 'script' , { required : true } )
10
9
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 } )
11
19
const fn = new AsyncFunction ( 'github' , 'context' , script )
12
- const client = new GitHub ( token )
13
20
const result = await fn ( client , context )
14
21
core . setOutput ( 'result' , JSON . stringify ( result ) )
15
22
}
You can’t perform that action at this time.
0 commit comments