File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,23 @@ export const Octokit = Core.plugin(
1111 autoProxyAgent 
1212) 
1313
14- // Octokit plugin to support the https_proxy environment variable 
14+ // Octokit plugin to support the https_proxy and no_proxy  environment variable 
1515function  autoProxyAgent ( octokit : Core )  { 
1616 const  proxy  =  process . env . https_proxy  ||  process . env . HTTPS_PROXY 
17+ 
18+  const  noProxy  =  process . env . no_proxy  ||  process . env . NO_PROXY 
19+  let  noProxyArray : string [ ]  =  [ ] 
20+  if  ( noProxy )  { 
21+  noProxyArray  =  noProxy . split ( ',' ) 
22+  } 
23+ 
1724 if  ( ! proxy )  return 
1825
1926 const  agent  =  new  HttpsProxyAgent ( proxy ) 
2027 octokit . hook . before ( 'request' ,  options  =>  { 
28+  if  ( noProxyArray . includes ( options . request . hostname ) )  { 
29+  return 
30+  } 
2131 options . request . agent  =  agent 
2232 } ) 
2333} 
                                 You can’t perform that action at this time. 
               
                  
0 commit comments