diff --git a/.github/workflows/label-cherry-pick.yaml b/.github/workflows/label-cherry-pick.yaml index 6ac390ada2516..5f46f1bf17283 100644 --- a/.github/workflows/label-cherry-pick.yaml +++ b/.github/workflows/label-cherry-pick.yaml @@ -57,6 +57,8 @@ jobs: REPOSITORY: ${{ github.repository }} GITHUB_REF: ${{ github.ref }} MERGE_COMMIT_SHA: ${{ github.event.pull_request.merge_commit_sha }} + AUTHOR_NAME: ${{ github.event.pull_request.user.name }} + AUTHOR_EMAIL: ${{ github.event.pull_request.user.email }} steps: - name: Checkout repository uses: kaidokert/checkout@v3.5.999 @@ -64,12 +66,10 @@ jobs: ref: ${{ matrix.target_branch }} fetch-depth: 0 persist-credentials: false - - name: Setup Git run: | git config --global user.name "GitHub Release Automation" git config --global user.email "github@google.com" - - name: Cherry pick merge commit run: | git fetch origin ${{ matrix.target_branch }} @@ -84,6 +84,7 @@ jobs: git add . git cherry-pick --continue fi + git commit --amend --no-edit --author="$AUTHOR_NAME <$AUTHOR_EMAIL>" - name: Create Pull Request uses: peter-evans/create-pull-request@2b011faafdcbc9ceb11414d64d0573f37c774b04 # v4.2.3