Skip to content

Commit 3598a9b

Browse files
committed
fix: correct release script PR detection using branch name
The script was using fuzzy text search which incorrectly matched unrelated PRs (e.g., PR #1911, a dependabot PR, was detected as release PR for v0.1.34). Changed to search by exact branch name (release/vX.Y.Z) which is more reliable. - Replace --search with --head flag for exact branch matching - Prevents false positive matches from GitHub's fuzzy search - Returns empty array when no PR exists (correct behavior) [AI-assisted debugging and comment]
1 parent 88cd19a commit 3598a9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ create_release_pr() {
367367

368368
# Check if a release PR for this version already exists or was merged
369369
echo -n " Checking for existing release PR... "
370-
local existing_pr=$(gh pr list --search "Release $VERSION OR 🚀 Release $VERSION" --state all --limit 1 --json number,state,title --jq '.[] | "\(.number)|\(.state)|\(.title)"' 2>/dev/null || echo "")
370+
local existing_pr=$(gh pr list --head "$branch_name" --state all --limit 1 --json number,state,title --jq '.[] | "\(.number)|\(.state)|\(.title)"' 2>/dev/null || echo "")
371371

372372
if [[ -n "$existing_pr" ]]; then
373373
local pr_number=$(echo "$existing_pr" | cut -d'|' -f1)

0 commit comments

Comments
 (0)