From 9bde641bb0ec56bd4093385f8bd24585dfa9ca50 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Wed, 8 Jan 2025 16:24:09 -0500 Subject: [PATCH] Updated create PR logic and added in Gitea List PR action. --- .gitea/workflows/deployment.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deployment.yml b/.gitea/workflows/deployment.yml index e4f7c2c3..1ebb2716 100644 --- a/.gitea/workflows/deployment.yml +++ b/.gitea/workflows/deployment.yml @@ -14,6 +14,12 @@ jobs: - name: Checkout Code uses: actions/checkout@v4 + - name: PR List (Action) + id: list-prs-action + uses: vicamo/gitea-list-pull-requests@v1.0.1 + with: + state: open + - name: PR list id: list-prs run: | @@ -22,10 +28,11 @@ jobs: -H 'Accept: application/json' \ -H 'Authorization: token ${{ secrets.BOT_GITEA_TOKEN }}' \ -sS | jq '{index: .number, state: .state}') + echo "PR List: ${pr_check}" pr_state=$(echo ${pr_check} | jq -r '.state') - name: Create PR - if: steps.list-prs.outputs.pr_state != 'open' + if: steps.list-prs.outputs.pr_state = null uses: arifer612/Gitea-PR-action@v1.2.0 with: url: ${{ gitea.server_url }}