Skip to content

Commit 391c8ae

Browse files
Check branch name format when back-porting PR (#9127)
1 parent a611e0c commit 391c8ae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tooling/backport-pr-to-patch-release.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ if [ -z "$PATCH_RELEASE_NAME" ]; then
2121
echo "Patch release name is not provided: $0 <patch-release-name> <pr-number>"
2222
exit 1
2323
fi
24-
# Check patch release name does not start with "release/"
25-
if [[ "$PATCH_RELEASE_NAME" =~ ^release/.* ]]; then
26-
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)"
24+
# Check patch release name format:
25+
if [[ ! "$PATCH_RELEASE_NAME" =~ ^v[0-9]+\.[0-9]+\.x$ ]]; then
26+
echo "Patch release name should be in the format v1.2.x"
2727
exit 1
2828
fi
2929
# Check PR number is provided

0 commit comments

Comments
 (0)