Skip to content

Commit da2501e

Browse files
authored
fix: quote the command to create PR in release PR action again (#11)
1 parent a2705bd commit da2501e

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

.github/actions/create-release-pr-for-gem/action.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ runs:
5858
env:
5959
GH_TOKEN: ${{ env.GITHUB_TOKEN }}
6060
run: |
61-
CMD=$(cat <<EOF
62-
gh pr create --title "chore: Release version to v${{ steps.changelog.outputs.version }}" --body "${{ steps.changelog.outputs.clean_changelog }}" --base ${{ inputs.base-branch }} --head release/${{ inputs.tag-prefix }}${{ steps.changelog.outputs.version }}
63-
EOF
64-
)
65-
eval $CMD
61+
BODY=${{ steps.changelog.outputs.clean_changelog }}
62+
ESCAPED_BODY=$(echo $BODY | sed 's/"/\\"/g')
63+
gh pr create --title "chore: Release version to v${{ steps.changelog.outputs.version }}" --body "$ESCAPED_BODY" --base ${{ inputs.base-branch }} --head release/${{ inputs.tag-prefix }}${{ steps.changelog.outputs.version }}
6664
shell: bash

.github/actions/create-release-pr-for-npm/action.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ runs:
5454
env:
5555
GH_TOKEN: ${{ env.GITHUB_TOKEN }}
5656
run: |
57-
CMD=$(cat <<EOF
58-
gh pr create --title "chore: Release version to v${{ steps.changelog.outputs.version }}" --body "${{ steps.changelog.outputs.clean_changelog }}" --base ${{ inputs.base-branch }} --head release/${{ inputs.tag-prefix }}${{ steps.changelog.outputs.version }}
59-
EOF
60-
)
61-
eval $CMD
57+
BODY=${{ steps.changelog.outputs.clean_changelog }}
58+
ESCAPED_BODY=$(echo $BODY | sed 's/"/\\"/g')
59+
gh pr create --title "chore: Release version to v${{ steps.changelog.outputs.version }}" --body "$ESCAPED_BODY" --base ${{ inputs.base-branch }} --head release/${{ inputs.tag-prefix }}${{ steps.changelog.outputs.version }}
6260
shell: bash

0 commit comments

Comments
 (0)