From 00e649fb149038da51e10bec6c0a8dc4e1557593 Mon Sep 17 00:00:00 2001 From: Calvin Kirs Date: Wed, 13 Nov 2024 15:48:32 +0800 Subject: [PATCH] [chore](auto-pick)Add the original PR number suffix to the automatically picked PR title --- .github/workflows/auto-cherry-pick.yml | 2 +- tools/auto-pick-script.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-cherry-pick.yml b/.github/workflows/auto-cherry-pick.yml index f76c88934fdc9e..2581de3f31cc4e 100644 --- a/.github/workflows/auto-cherry-pick.yml +++ b/.github/workflows/auto-cherry-pick.yml @@ -45,7 +45,7 @@ jobs: pip install PyGithub - name: Check SHA run: | - expected_sha="4e4c0d7689b765c7f0677d75d23222555afa9286af46cf77ced66fa247a298d9f8a8c86830d0ce55f70e5f09532b54fbafee040c0343833077cbc7e214d486d2" + expected_sha="4761d95a336b92e492276d589e580678af8d490d73fa0bd7d53f826aa3bf86b54e2b8725b436bc010aaf14a001e286bcd2b55b3ec0d2668d1e962d8c8b397eab" calculated_sha=$(sha512sum tools/auto-pick-script.py | awk '{ print $1 }') if [ "$calculated_sha" != "$expected_sha" ]; then echo "SHA mismatch! Expected: $expected_sha, but got: $calculated_sha" diff --git a/tools/auto-pick-script.py b/tools/auto-pick-script.py index a26abeaaa3ac02..19766a269c4cd1 100644 --- a/tools/auto-pick-script.py +++ b/tools/auto-pick-script.py @@ -97,7 +97,7 @@ # Create a new PR for the cherry-picked changes new_pr = repo.create_pull( - title=f"{TARGET_BRANCH}: {pr.title}", # Prefix with branch name + title=f"{TARGET_BRANCH}: {pr.title} #{pr.number}", # Prefix with branch name body=f"Cherry-picked from #{pr.number}", # Keep the original PR body head=new_branch_name, base=TARGET_BRANCH