Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tooling/backport-pr-to-patch-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ if [ -z "$PATCH_RELEASE_NAME" ]; then
echo "Patch release name is not provided: $0 <patch-release-name> <pr-number>"
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"
Copy link

Copilot AI Jul 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improve the error message by including the invalid input and sending it to stderr, for example: echo "Invalid patch release name '$PATCH_RELEASE_NAME'; expected format vMAJOR.MINOR.x." >&2.

Suggested change
echo "Patch release name should be in the format v1.2.x"
echo "Invalid patch release name '$PATCH_RELEASE_NAME'; expected format vMAJOR.MINOR.x." >&2

Copilot uses AI. Check for mistakes.
exit 1
fi
# Check PR number is provided
Expand Down