File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,8 @@ git fetch --quiet
5050git show-ref --verify --quiet " refs/remotes/origin/$PATCH_RELEASE_BRANCH " 1> /dev/null 2>&1 || { echo " Branch $PATCH_RELEASE_BRANCH does not exist" ; exit 1; }
5151# Check PR exists
5252echo " - Checking PR exists"
53- PR_COMMIT =$( gh pr view " $PR_NUMBER " --json commits --jq ' .commits[].oid' )
54- if [ -z " $PR_COMMIT " ]; then
53+ PR_COMMITS =$( gh pr view " $PR_NUMBER " --json commits --jq ' .commits[].oid' )
54+ if [ -z " $PR_COMMITS " ]; then
5555 echo " PR $PR_NUMBER does not exist"
5656 exit 1
5757fi
@@ -68,8 +68,10 @@ git pull
6868# Create a new branch for the backport
6969BRANCH_NAME=" $USER /backport-pr-$PR_NUMBER "
7070git checkout -b " $BRANCH_NAME "
71- # Cherry-pick PR commit
72- git cherry-pick " $PR_COMMIT "
71+ # Cherry-pick PR commits
72+ for PR_COMMIT in $PR_COMMITS ; do
73+ git cherry-pick -x " $PR_COMMIT "
74+ done
7375# Push the branch
7476git push -u origin " $BRANCH_NAME " --no-verify
7577# Create a PR
You can’t perform that action at this time.
0 commit comments