File tree 5 files changed +35
-6
lines changed
Filter options
5 files changed +35
-6
lines changed
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ The following arguments will be provided:
18
18
- ` glob ` A reference to the [ @actions/glob ] ( https://github.com/actions/toolkit/tree/main/packages/glob ) package
19
19
- ` io ` A reference to the [ @actions/io ] ( https://github.com/actions/toolkit/tree/main/packages/io ) package
20
20
- ` exec ` A reference to the [ @actions/exec ] ( https://github.com/actions/toolkit/tree/main/packages/exec ) package
21
+ - ` fetch ` A reference to the [ node-fetch] ( https://github.com/node-fetch/node-fetch ) package
21
22
- ` require ` A proxy wrapper around the normal Node.js ` require ` to enable
22
23
requiring relative paths (relative to the current working directory) and
23
24
requiring npm packages installed in the current working directory. If for
Original file line number Diff line number Diff line change 39
39
"@octokit/core" : " ^3.5.1" ,
40
40
"@octokit/plugin-paginate-rest" : " ^2.17.0" ,
41
41
"@octokit/plugin-rest-endpoint-methods" : " ^6.3.0" ,
42
- "@octokit/plugin-retry" : " ^3.0.9"
42
+ "@octokit/plugin-retry" : " ^3.0.9" ,
43
+ "node-fetch" : " ^2.6.7"
43
44
},
44
45
"devDependencies" : {
45
46
"@types/jest" : " ^27.0.2" ,
47
+ "@types/node-fetch" : " ^2.6.2" ,
46
48
"@typescript-eslint/eslint-plugin" : " ^3.10.1" ,
47
49
"@typescript-eslint/parser" : " ^3.10.1" ,
48
50
"@vercel/ncc" : " ^0.36.0" ,
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import {Context} from '@actions/github/lib/context'
4
4
import { GitHub } from '@actions/github/lib/utils'
5
5
import * as glob from '@actions/glob'
6
6
import * as io from '@actions/io'
7
+ import fetch from 'node-fetch'
7
8
8
9
const AsyncFunction = Object . getPrototypeOf ( async ( ) => null ) . constructor
9
10
@@ -14,6 +15,7 @@ type AsyncFunctionArguments = {
14
15
exec : typeof exec
15
16
glob : typeof glob
16
17
io : typeof io
18
+ fetch : typeof fetch
17
19
require : NodeRequire
18
20
__original_require__ : NodeRequire
19
21
}
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import {RequestRequestOptions} from '@octokit/types'
9
9
import { callAsyncFunction } from './async-function'
10
10
import { getRetryOptions , parseNumberArray , RetryOptions } from './retry-options'
11
11
import { wrapRequire } from './wrap-require'
12
+ import fetch from 'node-fetch'
12
13
13
14
process . on ( 'unhandledRejection' , handleError )
14
15
main ( ) . catch ( handleError )
@@ -56,7 +57,8 @@ async function main(): Promise<void> {
56
57
core,
57
58
exec,
58
59
glob,
59
- io
60
+ io,
61
+ fetch
60
62
} ,
61
63
script
62
64
)
You can’t perform that action at this time.
0 commit comments