This is an automated email from the ASF dual-hosted git repository.
roryqi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new 40007c804c [#9889][followup]: Fix the cherry-pick logic (#9910)
40007c804c is described below
commit 40007c804c21572b9ec015e5e3c1b04665d4dcce
Author: roryqi <[email protected]>
AuthorDate: Fri Feb 6 23:10:55 2026 +0800
[#9889][followup]: Fix the cherry-pick logic (#9910)
### What changes were proposed in this pull request?
Fix the cherry-pick logic about the format [#123] something (#456)
### Why are the changes needed?
This is a follow-up PR.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Tested by my repo. https://github.com/qqqttt123/gravitino/pull/19
---
.github/workflows/auto-cherry-pick.yml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/auto-cherry-pick.yml
b/.github/workflows/auto-cherry-pick.yml
index b3f8786985..e9c4005622 100644
--- a/.github/workflows/auto-cherry-pick.yml
+++ b/.github/workflows/auto-cherry-pick.yml
@@ -29,8 +29,12 @@ jobs:
COMMIT_SUBJECT=$(git log -1 --pretty=%s ${{ github.sha }})
echo "Commit: $COMMIT_SUBJECT"
- # Try to extract PR number for later use
- PR_NUMBER=$(echo "$COMMIT_MESSAGE" | grep -oE '#[0-9]+' | head -1 |
sed 's/#//')
+ PR_NUMBER=$(echo "$COMMIT_SUBJECT" | grep -oE '\(#[0-9]+\)' | tail
-1 | grep -oE '[0-9]+')
+
+ # If not found, try to match any #xxx pattern
+ if [ -z "$PR_NUMBER" ]; then
+ PR_NUMBER=$(echo "$COMMIT_MESSAGE" | grep -oE '#[0-9]+' | tail -1
| sed 's/#//')
+ fi
if [ -z "$PR_NUMBER" ]; then
echo "No PR number found, will skip label check"