-
-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add raw-output option for json output #900
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for implementing a fix, could you ensure that the test covers your changes if applicable.
@adonisgarciac Thanks for submitting this PR. I’ll suggest we make this an optional behaviour via an input I.e See: https://docs.github.com/en/actions/learn-github-actions/expressions#fromjson Failed matrix job: https://github.com/tj-actions/changed-files/actions/runs/3795491847 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add optional input to return raw JSON output from jq
. You’ll need to abstract the behaviour into a function that can be used with pipe
Thank you @jackton1. You are totally right! Let me know if there are some mistakes in the last changes that I have done with jq_raw_input as a variable. |
Nice work @adonisgarciac made some quick changes the arguments for @all-contributors please add @adonisgarciac for code, docs |
I've put up a pull request to add @adonisgarciac! 🎉 |
When you run this action with json: true, the output doesn't work properly because double quotes are escaped in the content of array:
code:
output
Error:
If I check the code where json is parsed:
With this change, the output will be: