File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1138,13 +1138,21 @@ const plugin_paginate_rest_1 = __nccwpck_require__(4193);
1138
1138
const plugin_rest_endpoint_methods_1 = __nccwpck_require__(3044);
1139
1139
const https_proxy_agent_1 = __nccwpck_require__(7219);
1140
1140
exports.Octokit = core_1.Octokit.plugin(plugin_paginate_rest_1.paginateRest, plugin_rest_endpoint_methods_1.restEndpointMethods, autoProxyAgent);
1141
- // Octokit plugin to support the https_proxy environment variable
1141
+ // Octokit plugin to support the https_proxy and no_proxy environment variable
1142
1142
function autoProxyAgent(octokit) {
1143
1143
const proxy = process.env.https_proxy || process.env.HTTPS_PROXY;
1144
+ const noProxy = process.env.no_proxy || process.env.NO_PROXY;
1145
+ let noProxyArray = [];
1146
+ if (noProxy) {
1147
+ noProxyArray = noProxy.split(',');
1148
+ }
1144
1149
if (!proxy)
1145
1150
return;
1146
1151
const agent = new https_proxy_agent_1.HttpsProxyAgent(proxy);
1147
1152
octokit.hook.before('request', options => {
1153
+ if (noProxyArray.includes(options.request.hostname)) {
1154
+ return;
1155
+ }
1148
1156
options.request.agent = agent;
1149
1157
});
1150
1158
}
You can’t perform that action at this time.
0 commit comments