From 455627a2f16df13e67cef1b476850bc2962fce62 Mon Sep 17 00:00:00 2001 From: John White <750350+johnhwhite@users.noreply.github.com> Date: Mon, 6 Jan 2025 07:29:41 -0500 Subject: [PATCH] ci: update cherry-pick to 11 --- .github/workflows/cherry-pick.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cherry-pick.yml b/.github/workflows/cherry-pick.yml index 2536924c63..38e24ab350 100644 --- a/.github/workflows/cherry-pick.yml +++ b/.github/workflows/cherry-pick.yml @@ -4,7 +4,7 @@ on: types: - closed branches: - - 7.x.x + - 11.x.x env: TARGET_BRANCH: main @@ -38,6 +38,7 @@ jobs: run: npm ci - name: Cherry pick + id: cherry-pick run: | # Set the git user to the author of the merge commit. git config user.name "$(git log -1 --pretty=format:'%an' ${{ github.event.pull_request.merge_commit_sha }})" @@ -73,7 +74,7 @@ jobs: exit 0 fi - echo "COMMIT_MESSAGE='$(git log -1 --pretty=%s | sed -e "s/'/\\\\'/g")'" >> $GITHUB_ENV + echo "commit_message=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT env: GH_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} @@ -83,6 +84,7 @@ jobs: github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} script: | const pr = context.payload.pull_request; + const title = ${{ toJson(steps.cherry-pick.outputs.commit_message) }}; let body = `:cherries: Cherry picked from #${pr.number} [${pr.title}](${pr.html_url})` const prAzureBoardLink = pr.body?.match(/(?<=\[)AB#\d+(?=])/g); if (prAzureBoardLink) { @@ -93,7 +95,7 @@ jobs: repo: context.repo.repo, head: process.env.CHERRY_PICK_BRANCH, base: process.env.TARGET_BRANCH, - title: process.env.COMMIT_MESSAGE, + title, body }).then(result => { console.log(`Created PR #${result.data.number}: ${result.data.html_url}`);