Skip to content

Commit

Permalink
Merge pull request #127 from fjogeleit/revert-conditional-stringify
Browse files Browse the repository at this point in the history
revert conditional stringify which leads to breaking changes with older versions
  • Loading branch information
fjogeleit authored Dec 19, 2023
2 parents 6dd8796 + c23f0d6 commit 3fee944
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
10 changes: 2 additions & 8 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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)
}

Expand Down
8 changes: 1 addition & 7 deletions src/handler/mask.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
2 changes: 1 addition & 1 deletion src/handler/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 3fee944

Please sign in to comment.