Skip to content
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

[BUG] Separator removing double-quotes #545

Closed
3 tasks done
SiddhantSadangi opened this issue Jul 14, 2022 · 2 comments · Fixed by #557
Closed
3 tasks done

[BUG] Separator removing double-quotes #545

SiddhantSadangi opened this issue Jul 14, 2022 · 2 comments · Fixed by #557
Labels
bug Something isn't working

Comments

@SiddhantSadangi
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Does this issue exist in the latest version?

  • I'm using the latest release

Describe the bug?

The separator parameter is stripping out escaped double quotes

To Reproduce

GitHub Actions Steps:

    - name: Get changed notebooks
      id: changed-notebooks
      uses: tj-actions/changed-files@v23.1
      with:
        separator: "\", \""
        files: |
          **/*.ipynb
    - name: List all changed notebooks
      id: output
      if: steps.changed-notebooks.outputs.any_changed == 'true'
      run: |
        echo -e "Separator: \", \""
        echo -e "Output: ${{ steps.changed-notebooks.outputs.all_changed_files }}"
        echo -e "JSON format: {\"path\":[\"${{ steps.changed-notebooks.outputs.all_changed_files }}\""]}"
        echo -e "::set-output name=changed_notebooks::{\"path\":[\"${{ steps.changed-notebooks.outputs.all_changed_files }}\""]}"
        echo -e "Valid JSON? ${{toJSON(needs.get-notebooks.outputs.changed_notebooks)}}"

Result:

Separator: ", "
Output: fail.ipynb, pass.ipynb
JSON format: {"path":["fail.ipynb, pass.ipynb"]}
echo -e ::set-output name=changed_notebooks::{"path":["fail.ipynb, pass.ipynb"]}
JSON: null

What OS are you seeing the problem on?

ubuntu-latest or ubuntu-20.04

Expected behavior?

Separator: ", "
Output: fail.ipynb", "pass.ipynb
JSON format: {"path":["fail.ipynb", "pass.ipynb"]}
echo -e ::set-output name=changed_notebooks::{"path":["fail.ipynb", "pass.ipynb"]}

Relevant log output

No response

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@SiddhantSadangi SiddhantSadangi added the bug Something isn't working label Jul 14, 2022
@github-actions
Copy link
Contributor

Thanks for reporting this issue, don't forget to star this project to help us reach a wider audience.

@jackton1 jackton1 linked a pull request Jul 31, 2022 that will close this issue
@jackton1
Copy link
Member

jackton1 commented Aug 3, 2022

@SiddhantSadangi This is now supported in the latest release by setting the json input to true.

See: https://github.com/tj-actions/changed-files/blob/main/.github/workflows/manual-matrix-test.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants