fix: quote release PR search phrase in pre-release.sh (#9573)

This commit is contained in:
Alex Hancock 2026-06-03 12:40:14 -04:00 committed by GitHub
parent 08e7480513
commit 83a4abf3ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,7 +14,10 @@ else
SEARCH="chore(release): release version"
fi
PR=$(gh pr list --repo "$REPO" --search "$SEARCH in:title" --state all --limit 1 --json number,title)
# Wrap the phrase in quotes so GitHub treats it literally. Without quotes the
# parentheses in "release):" are interpreted as search operators and the query
# matches nothing.
PR=$(gh pr list --repo "$REPO" --search "\"$SEARCH\" in:title" --state all --limit 1 --json number,title)
PR_NUMBER=$(echo "$PR" | jq -r '.[0].number // empty')
if [[ -z "$PR_NUMBER" ]]; then