Skip to content

Commit

Permalink
Amend cherry pick commit with original author name and email
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsavage1 committed Jul 10, 2023
1 parent b4ca909 commit 3e9084e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/label-cherry-pick.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@ 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/[email protected]
with:
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 "[email protected]"
- name: Cherry pick merge commit
run: |
git fetch origin ${{ matrix.target_branch }}
Expand All @@ -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
Expand Down

0 comments on commit 3e9084e

Please sign in to comment.