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
5 changes: 4 additions & 1 deletion scripts/pre-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

the comment is more about the search string than this

PR_NUMBER=$(echo "$PR" | jq -r '.[0].number // empty')

if [[ -z "$PR_NUMBER" ]]; then
Expand Down
Loading