mshick / add-pr-comment

uses: mshick/add-pr-comment@v2
MIT License
196 stars 54 forks source link

Encoding pipes? #104

Closed khromov closed 1 year ago

khromov commented 1 year ago

I have a workflow using this that prints a table which includes pipe characters.

The workflow part is:

- name: Comment PR
  uses: mshick/add-pr-comment@v2
  with:
    message-id: 'node-dependencies-count'
    message: |
      **👨‍💻 PR Branch Node Dependencies Count:**
  ${{ env.COUNT }}
  ```
repo-token: '${{ github.token }}'

When I try to run this I get the error:

Error: Unable to process file command 'env' successfully. Error: Invalid format '| Package | Dependency Count |'



Is there some way to prevent this by correctly encoding the pipe signs?
khromov commented 1 year ago

I realized this error came from how I was inserting the output of the script into $GITHUB_ENV, and not this action. Closing.