Verifying PR index for curl request.

This commit is contained in:
2024-12-19 09:37:13 -05:00
parent ebd1194f34
commit 20a781c178
+13 -10
View File
@@ -116,17 +116,20 @@ jobs:
# -d '{ # -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 }}" # "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: Verify PR number
- name: Post SonarQube Results as Comment
run: | run: |
curl ${{ vars.RINOA_GITEA_URL }}/api/v1/repos/${{ github.repository }}/pulls/${{ github.pull_request.number }}/reviews \ echo "PR number: ${{ github.event.pull_request.number }}"
-X POST \
-H 'Accept: application/json' \ # - name: Post SonarQube Results as Comment
-H 'Authorization: token ${{ secrets.BOT_GITEA_TOKEN }}' \ # run: |
-H 'Content-Type: application/json' \ # curl ${{ vars.RINOA_GITEA_URL }}/api/v1/repos/${{ github.repository }}/pulls/${{ github.pull_request.number }}/reviews \
-d '{ # -X POST \
"body": "SonarQube analysis results:\n\n${{ steps.convert-json-to-md.outputs.table }}\n\n${{ steps.quality-gate.outputs.quality-gate-status }}" # -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 # # Job 3: Merge PR if Quality Gate passes
# merge-pr: # merge-pr:
# runs-on: ubuntu-latest # runs-on: ubuntu-latest