This is an automated email from the ASF dual-hosted git repository.

yuqi1129 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 803230f706 [MINOR] ci: Support automatic cherry-picks to branch-2.0 
(#14982)
803230f706 is described below

commit 803230f70656cd0eb14d6e80d211367dd777b694
Author: Jerry Shao <[email protected]>
AuthorDate: Mon Nov 16 21:25:40 2026 +0800

    [MINOR] ci: Support automatic cherry-picks to branch-2.0 (#14982)
    
    ### What changes were proposed in this pull request?
    
    Add automatic cherry-picks to `branch-2.0` and retire automatic
    cherry-picks to `branch-1.2`. The workflow supports the `branch-1.3` and
    `branch-2.0` targets.
    
    ### Why are the changes needed?
    
    Maintainers are preparing the 2.0 release branch and expect no changes
    to the 1.2 branch in the near future.
    
    ### Does this PR introduce _any_ user-facing change?
    
    Maintainers can label a PR with `branch-2.0` before merging it into
    `main` to request a backport. The workflow ignores the `branch-1.2`
    label.
    
    ### How was this patch tested?
    
    Verified the workflow outputs and job targets locally. Ran the label
    detection step with seven cases covering both active targets, the
    retired label alone and alongside an active label, both active labels
    together, an empty label list, and a similar label name.
---
 .github/workflows/auto-cherry-pick.yml | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/.github/workflows/auto-cherry-pick.yml 
b/.github/workflows/auto-cherry-pick.yml
index 9b571f97c8..60ef41d51c 100644
--- a/.github/workflows/auto-cherry-pick.yml
+++ b/.github/workflows/auto-cherry-pick.yml
@@ -13,8 +13,8 @@ jobs:
     runs-on: ubuntu-latest
     name: Detect cherry-pick labels from merged PR
     outputs:
-      branch-1-2: ${{ steps.check-labels.outputs.branch-1-2 }}
       branch-1-3: ${{ steps.check-labels.outputs.branch-1-3 }}
+      branch-2-0: ${{ steps.check-labels.outputs.branch-2-0 }}
       commit-sha: ${{ steps.get-commit.outputs.commit-sha }}
       commit-message: ${{ steps.get-commit.outputs.commit-message }}
     steps:
@@ -67,34 +67,34 @@ jobs:
           echo "PR #$PR_NUMBER labels: $LABELS"
           
           # Check for each branch label
-          if echo "$LABELS" | grep -q "branch-1.2"; then
-            echo "branch-1-2=true" >> $GITHUB_OUTPUT
-          else
-            echo "branch-1-2=false" >> $GITHUB_OUTPUT
-          fi
-
           if echo "$LABELS" | grep -q "branch-1.3"; then
             echo "branch-1-3=true" >> $GITHUB_OUTPUT
           else
             echo "branch-1-3=false" >> $GITHUB_OUTPUT
           fi
 
-  cherry-pick-branch-1-2:
+          if echo "$LABELS" | grep -Fxq "branch-2.0"; then
+            echo "branch-2-0=true" >> $GITHUB_OUTPUT
+          else
+            echo "branch-2-0=false" >> $GITHUB_OUTPUT
+          fi
+
+  cherry-pick-branch-1-3:
     needs: detect-cherry-pick-labels
-    if: needs.detect-cherry-pick-labels.outputs.branch-1-2 == 'true'
+    if: needs.detect-cherry-pick-labels.outputs.branch-1-3 == 'true'
     uses: ./.github/workflows/cherry-pick-branch.yml
     with:
-      target-branch: branch-1.2
+      target-branch: branch-1.3
       commit-sha: ${{ needs.detect-cherry-pick-labels.outputs.commit-sha }}
       commit-message: ${{ 
needs.detect-cherry-pick-labels.outputs.commit-message }}
     secrets: inherit
 
-  cherry-pick-branch-1-3:
+  cherry-pick-branch-2-0:
     needs: detect-cherry-pick-labels
-    if: needs.detect-cherry-pick-labels.outputs.branch-1-3 == 'true'
+    if: needs.detect-cherry-pick-labels.outputs.branch-2-0 == 'true'
     uses: ./.github/workflows/cherry-pick-branch.yml
     with:
-      target-branch: branch-1.3
+      target-branch: branch-2.0
       commit-sha: ${{ needs.detect-cherry-pick-labels.outputs.commit-sha }}
       commit-message: ${{ 
needs.detect-cherry-pick-labels.outputs.commit-message }}
     secrets: inherit

Reply via email to