From 8d8e3f3584cc1e7ce04b887e3e8c7ba019a9e980 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Tue, 17 Dec 2024 13:26:38 -0500 Subject: [PATCH] Reverting from gitea-pr-action to curl. --- .gitea/workflows/branch-sonarscan-pr-merge.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/branch-sonarscan-pr-merge.yml b/.gitea/workflows/branch-sonarscan-pr-merge.yml index 186db13c..294230a5 100644 --- a/.gitea/workflows/branch-sonarscan-pr-merge.yml +++ b/.gitea/workflows/branch-sonarscan-pr-merge.yml @@ -34,10 +34,20 @@ jobs: - name: Create PR in Gitea if: ${{ steps.check-pr.outputs.pr_status.state }} == 'closed' id: create-pr - uses: arifer612/Gitea-PR-action@v1.2.0 - with: - url: ${{ vars.RINOA_GITEA_URL }} - token: ${{ secrets.BOT_GITEA_TOKEN }} + run: | + echo "Creating PR..." + curl ${{ vars.RINOA_GITEA_URL }}/api/v1/repos/${{ github.repository }}/pulls \ + -X 'POST' \ + -H 'Accept: application/json' \ + -H 'Authorization: token ${{ secrets.BOT_GITEA_TOKEN }}' \ + -H 'Content-Type: application/json' \ + -d '{ + "title": "PR: ${{ github.ref_name }} -> main", + "body": "This is an automated PR created by Gitea Actions.", + "base": "main", + "head": "${{ github.ref_name }}" + }' | jq '{index: .number}' > pr_created.json + echo "pr_created=$(jq -c . pr_created.json)" >> "$GITHUB_OUTPUT" # # Job 2: Run SonarQube Analysis # sonarqube-analysis: