This commit is contained in:
2025-01-15 11:55:17 -05:00
parent fe66d7a723
commit fb3f0452a2
+3 -2
View File
@@ -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..."