From 83a4abf3eaa974c4fcc58aabe829302817f605c1 Mon Sep 17 00:00:00 2001 From: Alex Hancock Date: Wed, 3 Jun 2026 12:40:14 -0400 Subject: [PATCH] fix: quote release PR search phrase in pre-release.sh (#9573) --- scripts/pre-release.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/pre-release.sh b/scripts/pre-release.sh index eed42d54..d6d8f1bd 100755 --- a/scripts/pre-release.sh +++ b/scripts/pre-release.sh @@ -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