Skip to content

Commit 20dac2e

Browse files
build: update distribution (#1208)
Co-authored-by: peter-evans <[email protected]>
1 parent 8557470 commit 20dac2e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

dist/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1138,13 +1138,21 @@ const plugin_paginate_rest_1 = __nccwpck_require__(4193);
11381138
const plugin_rest_endpoint_methods_1 = __nccwpck_require__(3044);
11391139
const https_proxy_agent_1 = __nccwpck_require__(7219);
11401140
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
11421142
function autoProxyAgent(octokit) {
11431143
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+
}
11441149
if (!proxy)
11451150
return;
11461151
const agent = new https_proxy_agent_1.HttpsProxyAgent(proxy);
11471152
octokit.hook.before('request', options => {
1153+
if (noProxyArray.includes(options.request.hostname)) {
1154+
return;
1155+
}
11481156
options.request.agent = agent;
11491157
});
11501158
}

0 commit comments

Comments
 (0)