diff --git a/lib/main.js b/lib/main.js index 143e8687..4231ac90 100644 --- a/lib/main.js +++ b/lib/main.js @@ -49,6 +49,10 @@ function run() { core_1.startGroup('Dump payload'); utils_1.logInfo(JSON.stringify(payload, null, 2)); core_1.endGroup(); + core_1.startGroup('Proxy config'); + utils_1.logInfo(`http_proxy -> ${process.env['http_proxy'] || process.env['HTTP_PROXY'] || 'no http proxy setted'}`); + utils_1.logInfo(`https_proxy -> ${process.env['https_proxy'] || process.env['HTTPS_PROXY'] || 'no https proxy setted'}`); + core_1.endGroup(); utils_1.logInfo(`Triggering ${inputs.webhooks.length} webhook${inputs.webhooks.length > 1 ? 's' : ''}...`); yield Promise.all(inputs.webhooks.map(w => wrapWebhook(w.trim(), payload))); } @@ -61,9 +65,7 @@ function wrapWebhook(webhook, payload) { return function () { return __awaiter(this, void 0, void 0, function* () { try { - utils_1.logInfo(process.env['http_proxy'] || process.env['HTTP_PROXY'] || 'no http proxy setted'); - utils_1.logInfo(process.env['https_proxy'] || process.env['HTTPS_PROXY'] || 'no https proxy setted'); - yield axios_1.default.post(webhook, payload); + yield axios_1.default.post(webhook, payload, { maxRedirects: 20 }); } catch (e) { if (e.response) {