From 5706afdfeb3b2af7afee72ec18488b6e1e29709a Mon Sep 17 00:00:00 2001 From: Ning Sun Date: Wed, 9 Sep 2026 02:43:45 +0000 Subject: [PATCH] ci(backport): label backport PRs with their version name (#9073) * ci(backport): label backport PRs with their version name Signed-off-by: Ning Sun * ci(backport): restore multi-line PR body string Signed-off-by: Ning Sun --------- Signed-off-by: Ning Sun --- .github/workflows/backport.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 3d64c7dd55..8cf2da32fc 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -83,9 +83,18 @@ jobs: git push origin "${head_branch}" + # Ensure the version label (e.g. "v1.2") exists before attaching it. + # GitHub does not create labels implicitly, so upsert it idempotently. + gh label create "${target}" \ + --color 0e8a16 \ + --description "Backport to ${release_branch}" \ + --force \ + || true + gh pr create \ --base "${release_branch}" \ --head "${head_branch}" \ + --label "${target}" \ --title "${PR_TITLE} [Backport ${release_branch}]" \ --body "Backport of #${PR_NUMBER} to ${release_branch}.