From 7ddfabed624c7381daa719453a802db263bdbd93 Mon Sep 17 00:00:00 2001 From: Yuhong Sun Date: Sun, 27 Oct 2024 17:03:53 -0700 Subject: [PATCH] Backport Debugging --- .github/workflows/pr-backport-autotrigger.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-backport-autotrigger.yml b/.github/workflows/pr-backport-autotrigger.yml index f73dafaff343..af4fdd31c5ec 100644 --- a/.github/workflows/pr-backport-autotrigger.yml +++ b/.github/workflows/pr-backport-autotrigger.yml @@ -83,8 +83,13 @@ jobs: # Fetch all history for all branches and tags git fetch --prune - # Prepare the beta branch + # Reset and prepare the beta branch git checkout ${{ steps.list-branches.outputs.beta }} + git reset --hard origin/${{ steps.list-branches.outputs.beta }} + echo "Last 5 commits on beta branch:" + git log -n 5 --pretty=format:"%H" + + # Cherry-pick the merge commit from the merged PR git cherry-pick -m 1 ${{ github.event.pull_request.merge_commit_sha }} || { echo "Cherry-pick to beta failed due to conflicts." exit 1 @@ -96,8 +101,12 @@ jobs: git push origin ${{ steps.list-branches.outputs.beta }} git push origin ${{ steps.list-branches.outputs.new_beta_tag }} - # Prepare the stable branch + # Reset and prepare the stable branch git checkout ${{ steps.list-branches.outputs.stable }} + git reset --hard origin/${{ steps.list-branches.outputs.stable }} + echo "Last 5 commits on stable branch:" + git log -n 5 --pretty=format:"%H" + # Cherry-pick the merge commit from the merged PR git cherry-pick -m 1 ${{ github.event.pull_request.merge_commit_sha }} || { echo "Cherry-pick to stable failed due to conflicts."