From 601f785499ae506ff9d5ecdd79a400fcdb0795b1 Mon Sep 17 00:00:00 2001 From: Bruce Bujon Date: Wed, 9 Jul 2025 06:38:28 +0200 Subject: [PATCH] feat(tooling): Check branch name format when backporting PR --- tooling/backport-pr-to-patch-release.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tooling/backport-pr-to-patch-release.sh b/tooling/backport-pr-to-patch-release.sh index adc25b4804b..643a4978dd7 100755 --- a/tooling/backport-pr-to-patch-release.sh +++ b/tooling/backport-pr-to-patch-release.sh @@ -21,9 +21,9 @@ if [ -z "$PATCH_RELEASE_NAME" ]; then echo "Patch release name is not provided: $0 " exit 1 fi -# Check patch release name does not start with "release/" -if [[ "$PATCH_RELEASE_NAME" =~ ^release/.* ]]; then - echo "Patch release name should not be the same as the release branch name. Only include the release name without patch number. (e.g. v1.2.x)" +# Check patch release name format: +if [[ ! "$PATCH_RELEASE_NAME" =~ ^v[0-9]+\.[0-9]+\.x$ ]]; then + echo "Patch release name should be in the format v1.2.x" exit 1 fi # Check PR number is provided