From ed3538c31705a65cdf551e050f0a604a1b1c39be Mon Sep 17 00:00:00 2001 From: Jose Luque Date: Tue, 27 Jan 2026 12:08:19 +0100 Subject: [PATCH] fix: create_pr_if_not_exists check for closed/merged branches too --- .github/scripts/utils.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/utils.sh b/.github/scripts/utils.sh index 6fda879c..ad991af3 100644 --- a/.github/scripts/utils.sh +++ b/.github/scripts/utils.sh @@ -67,11 +67,11 @@ create_pr_if_not_exists() { local pr_exists=false if [[ "${search_method}" == "search" ]]; then - if [[ $(gh pr list --search "head:${branch_name}" --json number --jq 'length') -gt 0 ]]; then + if [[ $(gh pr list --search "head:${branch_name}" --state all --json number --jq 'length') -gt 0 ]]; then pr_exists=true fi else - if [[ $(gh pr list --head "${branch_name}" --json number --jq 'length') -gt 0 ]]; then + if [[ $(gh pr list --head "${branch_name}" --state all --json number --jq 'length') -gt 0 ]]; then pr_exists=true fi fi