From fb3f0452a2a90a590c4d0076591ca2aaf3545368 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Wed, 15 Jan 2025 11:55:17 -0500 Subject: [PATCH] . --- .gitea/workflows/deployment.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deployment.yml b/.gitea/workflows/deployment.yml index 76d80af0..1d0303b6 100644 --- a/.gitea/workflows/deployment.yml +++ b/.gitea/workflows/deployment.yml @@ -27,8 +27,9 @@ jobs: tea login add --name gitea-rinoa --url ${{ secrets.RINOA_GITEA_URL }} --user gitea-sonarqube-bot --password "${{ secrets.BOT_GITEA_PASSWORD }}" --token ${{ secrets.BOT_GITEA_TOKEN }} tea login default gitea-rinoa - echo "Checking if PR exists for branch: ${{ github.ref_name }}" - PR_EXISTS=$(tea pr ls --repo "${{ github.repository }}" --state open --fields index,title,head,state --output csv | grep -c "${{ github.ref_name }}") + echo "Checking if any open PRs exist for branch: ${{ github.ref_name }}" + PR_STATE=$(tea pr ls --repo "${{ github.repository }}" --state all --fields index,title,head,state --output csv | grep "${{ github.ref_name }}") | head -1 | awk -F',' '{print $4}' | tr -d '"' + PR_EXISTS=$(echo "$PR_STATE" | wc -l) if [ "$PR_EXISTS" -ge 1 ]; then echo "PR exists, skipping creation..."