From 0822a9b3796381b1232595991e3983e2c1e7708f Mon Sep 17 00:00:00 2001 From: rriski Date: Fri, 8 Nov 2024 07:17:35 +0000 Subject: [PATCH] fix: attempt to close previous PRs only if a new one was created (#177) --- .github/workflows/update.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index e740fcc..3deeeea 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -43,6 +43,7 @@ jobs: schema bump automated pr - name: Close previous update PRs + if: steps.create_pr.outputs.pull-request-operation == 'created' run: | new_pr_number=${{ steps.create_pr.outputs.pull-request-number }} prs=$(gh pr list --state open --json number,headRefName --jq '.[] | select(.headRefName | startswith("update/")) | .number')