From 20a781c17867d24ad9967d2537377cb12c4e5dcf Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Thu, 19 Dec 2024 09:37:13 -0500 Subject: [PATCH] Verifying PR index for curl request. --- .../workflows/branch-sonarscan-pr-merge.yml | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/branch-sonarscan-pr-merge.yml b/.gitea/workflows/branch-sonarscan-pr-merge.yml index c51ab303..481f6d1a 100644 --- a/.gitea/workflows/branch-sonarscan-pr-merge.yml +++ b/.gitea/workflows/branch-sonarscan-pr-merge.yml @@ -116,17 +116,20 @@ jobs: # -d '{ # "body": "SonarQube analysis results:\n\n- Bugs: ${{ env.SONAR_BUGS }}\n- Vulnerabilities: ${{ env.SONAR_VULNERABILITIES }}\n- Code Smells: ${{ env.SONAR_CODE_SMELLS }}\n- Coverage: ${{ env.SONAR_COVERAGE }}%\n- Duplications: ${{ env.SONAR_DUPLICATIONS }}%\n- Quality Gate Status: ${{ env.SONAR_QUALITY_GATE_STATUS }}" # }' - - - name: Post SonarQube Results as Comment + - name: Verify PR number run: | - curl ${{ vars.RINOA_GITEA_URL }}/api/v1/repos/${{ github.repository }}/pulls/${{ github.pull_request.number }}/reviews \ - -X POST \ - -H 'Accept: application/json' \ - -H 'Authorization: token ${{ secrets.BOT_GITEA_TOKEN }}' \ - -H 'Content-Type: application/json' \ - -d '{ - "body": "SonarQube analysis results:\n\n${{ steps.convert-json-to-md.outputs.table }}\n\n${{ steps.quality-gate.outputs.quality-gate-status }}" - }' + echo "PR number: ${{ github.event.pull_request.number }}" + + # - name: Post SonarQube Results as Comment + # run: | + # curl ${{ vars.RINOA_GITEA_URL }}/api/v1/repos/${{ github.repository }}/pulls/${{ github.pull_request.number }}/reviews \ + # -X POST \ + # -H 'Accept: application/json' \ + # -H 'Authorization: token ${{ secrets.BOT_GITEA_TOKEN }}' \ + # -H 'Content-Type: application/json' \ + # -d '{ + # "body": "SonarQube analysis results:\n\n${{ steps.convert-json-to-md.outputs.table }}\n\n${{ steps.quality-gate.outputs.quality-gate-status }}" + # }' # # Job 3: Merge PR if Quality Gate passes # merge-pr: # runs-on: ubuntu-latest