From c23f0d663183726908ff8976ad8a1602b0f992d1 Mon Sep 17 00:00:00 2001 From: Frank Jogeleit Date: Tue, 19 Dec 2023 09:12:54 +0100 Subject: [PATCH] revert conitional stringify which leads to breaking changes with older versions Signed-off-by: Frank Jogeleit --- dist/index.js | 10 ++-------- src/handler/mask.js | 8 +------- src/handler/output.js | 2 +- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/dist/index.js b/dist/index.js index 7a54fba..35b4725 100644 --- a/dist/index.js +++ b/dist/index.js @@ -26612,13 +26612,7 @@ const { GithubActions } = __nccwpck_require__(8169); * @returns {(response: axios.AxiosResponse) => void} */ const createMaskHandler = (actions) => (response) => { - let data = response.data - - if (typeof data == 'object') { - data = JSON.stringify(data) - } - - actions.setSecret(data) + actions.setSecret(JSON.stringify(response.data)) } module.exports = { createMaskHandler } @@ -26640,7 +26634,7 @@ const { GithubActions } = __nccwpck_require__(8169); * @returns {(response: axios.AxiosResponse) => void} */ const createOutputHandler = (actions) => (response) => { - actions.setOutput('response', response.data) + actions.setOutput('response', JSON.stringify(response.data)) actions.setOutput('headers', response.headers) } diff --git a/src/handler/mask.js b/src/handler/mask.js index 5043de6..c619c01 100644 --- a/src/handler/mask.js +++ b/src/handler/mask.js @@ -9,13 +9,7 @@ const { GithubActions } = require('../githubActions'); * @returns {(response: axios.AxiosResponse) => void} */ const createMaskHandler = (actions) => (response) => { - let data = response.data - - if (typeof data == 'object') { - data = JSON.stringify(data) - } - - actions.setSecret(data) + actions.setSecret(JSON.stringify(response.data)) } module.exports = { createMaskHandler } \ No newline at end of file diff --git a/src/handler/output.js b/src/handler/output.js index 8212672..081d796 100644 --- a/src/handler/output.js +++ b/src/handler/output.js @@ -9,7 +9,7 @@ const { GithubActions } = require('../githubActions'); * @returns {(response: axios.AxiosResponse) => void} */ const createOutputHandler = (actions) => (response) => { - actions.setOutput('response', response.data) + actions.setOutput('response', JSON.stringify(response.data)) actions.setOutput('headers', response.headers) }