Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/cherryPick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
cherryPick:
needs: createNewVersion
runs-on: ubuntu-latest
env:
# The name of the branch created if there are conflicts when CPing the PR.
CONFLICT_BRANCH_NAME: cherry-pick-staging-${{ github.event.inputs.PULL_REQUEST_NUMBER }}-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- name: Checkout staging branch
# v4
Expand Down Expand Up @@ -124,8 +127,8 @@ jobs:
- name: Push changes
run: |
if [[ ${{steps.cherryPick.outputs.HAS_CONFLICTS}} == 'true' ]]; then
git checkout -b ${{ github.actor }}-cherry-pick-staging-${{ github.event.inputs.PULL_REQUEST_NUMBER }}-${{ github.run_attempt }}
git push --set-upstream origin ${{ github.actor }}-cherry-pick-staging-${{ github.event.inputs.PULL_REQUEST_NUMBER }}-${{ github.run_attempt }}
git checkout -b ${{ env.CONFLICT_BRANCH_NAME }}
git push --set-upstream origin ${{ env.CONFLICT_BRANCH_NAME }}
else
git push origin staging
fi
Expand All @@ -143,7 +146,7 @@ jobs:

\`\`\`bash
git fetch
git checkout ${{ github.actor }}-cherry-pick-staging-${{ github.event.inputs.PULL_REQUEST_NUMBER }}-${{ github.run_attempt }}
git checkout ${{ env.CONFLICT_BRANCH_NAME }}
git cherry-pick -S -x --mainline 1 ${{ steps.getCPMergeCommit.outputs.MERGE_COMMIT_SHA }}
\`\`\`

Expand All @@ -153,7 +156,7 @@ jobs:
git commit --amend -m "\$(git log -1 --pretty=%B)" -m "(CP triggered by ${{ github.actor }})"
\`\`\`

That will help us keep track of who triggered this CP. Once all that's done, push your changes with \`git push origin ${{ github.actor }}-cherry-pick-staging-${{ github.event.inputs.PULL_REQUEST_NUMBER }}-${{ github.run_attempt }}\`, and then open this PR for review.
That will help us keep track of who triggered this CP. Once all that's done, push your changes with \`git push origin ${{ env.CONFLICT_BRANCH_NAME }}\`, and then open this PR for review.

Note that you **must** test this PR, and both the author and reviewer checklist should be completed, just as if you were merging the PR to main.

Expand Down