Skip to content

Commit 0135b4e

Browse files
authored
Fix AutoPR dealing with PR title/body contain quota like ` ' " (alibaba#913)
1 parent 6556094 commit 0135b4e

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/auto-pr-precise.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jobs:
6262
echo "MESSAGE<<__EOF" >> $GITHUB_OUTPUT
6363
git log --format="> %B" ${{ github.event.commits[0].id }}~..${{ github.event.after }} >> $GITHUB_OUTPUT
6464
echo "__EOF" >> $GITHUB_OUTPUT
65+
cat $GITHUB_OUTPUT
6566
REVS=$(git rev-list --reverse ${{ github.event.commits[0].id }}~..${{ github.event.after }} )
6667
for rev in "$REVS"; do
6768
if ! git cherry-pick ${rev} ; then
@@ -74,14 +75,17 @@ jobs:
7475
7576
- uses: actions/github-script@v7
7677
name: Open pick PR to ${{steps.branch_info.outputs.NEXT_BRANCH}}
78+
env:
79+
TITLE: ${{steps.merge-changes.outputs.TITLE}}
80+
MESSAGE: ${{steps.merge-changes.outputs.MESSAGE}}
7781
with:
7882
github-token: ${{ secrets.AUTOPR_SECRET }}
7983
script: |
8084
await github.rest.pulls.create({
8185
...context.repo,
82-
title: `[Pick][${{steps.branch_info.outputs.CURRENT_VERSION}} to ${{steps.branch_info.outputs.NEXT_VERSION}}] ${{steps.merge-changes.outputs.TITLE}}`,
86+
title: `[Pick][${{steps.branch_info.outputs.CURRENT_VERSION}} to ${{steps.branch_info.outputs.NEXT_VERSION}}] ` + process.env.TITLE,
8387
head: `${{steps.create_branch.outputs.PRBRANCH}}`,
8488
base: `${{steps.branch_info.outputs.NEXT_BRANCH}}`,
85-
body: `${{steps.merge-changes.outputs.MESSAGE}}\nGenerated by Auto PR, by cherry-pick related commits`,
89+
body: process.env.MESSAGE + `\nGenerated by Auto PR, by cherry-pick related commits`,
8690
});
8791

0 commit comments

Comments
 (0)