pull-request
pull-request copied to clipboard
Double Quotes in `pr_body` break string
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: repo-sync/pull-request@v2
with:
github_token: ${{ secrets.PAT }}
pr_title: "⤴️ ${{ github.actor }} Draft Merge Request"
pr_body: |
:arrow_heading_up: Closes: #issueid <!-- your issue -->
**Describe the Change** <!-- A longer description -->
"Put a description here"
pr_draft: true
Expected: PR body is complete
Actual: PR body cuts off at Put
, without the quotation marks
I think the cause for this is the arg building for hub which doesn't have any double quote protection. Unfortunately, there's not much that can be done. Either the pr_body allows ${{ expressions }}
, or it has to require "
to be escaped. The current behavior requires "
to be escaped, at which point we may just want to update the readme.
This might be the way to go. PR welcome if anyone has time!
Excerpt
When expanding a variable via `${variable@Q}`:The expansion is a string that is the value of parameter quoted in a format that can be reused as input.
Example:
$ expand-q() { for i; do echo ${i@Q}; done; } # Same as for `i in "$@"`...
$ expand-q word "two words" 'new
> line' "single'quote" 'double"quote'
word
'two words'
$'new\nline'
'single'\''quote'
'double"quote'
Facing the same issue
I'd like to add that inline code blocks
(single backticks) seem to get removed from the PR body as well
@xaviergmail I'm seeing the same thing. You also can't have a multiline PR body.
Thanks for your inputs 😃
PR welcome if any of you have time. Potential solution is in my last comment~
I am not 100% sure, but I believe there may be an issue with double quotes in a pr_template
as well.
https://github.com/RetroArcher/.github/runs/7258096096?check_suite_focus=true#step:4:47
Oddly, the PR was created, but the step still failed.
It seems to be working if \n is used with multiline string e.g.: https://github.com/Telefonica/mistica-icons/blob/8ece560530b0277eb0bd41aaddfc507d9ddf3dae/.github/workflows/figma-export.yml#L284-L286
Example PR: https://github.com/Telefonica/mistica-icons/pull/233