File tree Expand file tree Collapse file tree 4 files changed +135
-376
lines changed
Expand file tree Collapse file tree 4 files changed +135
-376
lines changed Original file line number Diff line number Diff line change 2828 },
2929 "homepage" : " https://github.com/sturdy-dev/codeball-action#readme" ,
3030 "dependencies" : {
31- "@actions/core" : " ^1.8.2 " ,
31+ "@actions/core" : " ^1.9.1 " ,
3232 "@actions/github" : " ^5.0.3" ,
33- "@octokit/action" : " ^3.18.1" ,
34- "@octokit/core" : " ^3.6.0" ,
35- "@octokit/plugin-rest-endpoint-methods" : " ^5.13.0" ,
36- "node-fetch" : " ^3.2.4"
33+ "@octokit/core" : " ^4.0.5" ,
34+ "@octokit/plugin-paginate-rest" : " ^4.1.0" ,
35+ "@octokit/plugin-rest-endpoint-methods" : " ^6.3.0" ,
36+ "https-proxy-agent" : " ^5.0.1" ,
37+ "node-fetch" : " ^3.2.10"
3738 },
3839 "devDependencies" : {
3940 "@types/jest" : " ^27.5.1" ,
Original file line number Diff line number Diff line change 11import { Octokit as Core } from '@octokit/core'
22import { paginateRest } from '@octokit/plugin-paginate-rest'
33import { legacyRestEndpointMethods } from '@octokit/plugin-rest-endpoint-methods'
4- import ProxyAgent from 'proxy-agent'
4+
5+ const HttpsProxyAgent = require ( 'https-proxy-agent' )
56
67const DEFAULTS = {
78 baseUrl : getApiBaseUrl ( )
89}
910
11+ const httpProxy = process . env [ 'HTTP_PROXY' ] || process . env [ 'http_proxy' ]
12+ const httpsProxy = process . env [ 'HTTPS_PROXY' ] || process . env [ 'https_proxy' ]
13+
14+ const proxy = httpProxy
15+ ? new HttpsProxyAgent ( httpProxy )
16+ : httpsProxy
17+ ? new HttpsProxyAgent ( httpProxy )
18+ : undefined
19+
1020export const Octokit = Core . plugin (
1121 paginateRest ,
1222 legacyRestEndpointMethods
@@ -15,7 +25,7 @@ export const Octokit = Core.plugin(
1525 ...DEFAULTS ,
1626 ...options ,
1727 request : {
18- agent : new ProxyAgent ( ) ,
28+ agent : proxy ,
1929 ...options . request
2030 }
2131 }
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ const suggestViaGitHub = async ({
126126 path : string
127127 start_line ?: number
128128 side ?: 'LEFT' | 'RIGHT'
129- line ? : number
129+ line : number
130130 start_side ?: 'LEFT' | 'RIGHT'
131131 }
132132
You can’t perform that action at this time.
0 commit comments