Variable tweaks here and there.
This commit is contained in:
@@ -109,26 +109,18 @@ jobs:
|
|||||||
|
|
||||||
- name: Post SonarQube Results as Comment
|
- name: Post SonarQube Results as Comment
|
||||||
env:
|
env:
|
||||||
RINOA_GITEA_URL: ${{ vars.RINOA_GITEA_URL }}
|
|
||||||
PR_NUMBER: ${{ needs.check-and-create-pr.outputs.pr_number }}
|
PR_NUMBER: ${{ needs.check-and-create-pr.outputs.pr_number }}
|
||||||
|
SQ_RESULTS: ${{ steps.convert-json-to-md.outputs.table }}
|
||||||
|
QG_STATUS: ${{ steps.quality-gate.outputs.quality-gate-status }}
|
||||||
run: |
|
run: |
|
||||||
payload=$(jq -n --arg body "SonarQube analysis results:\n\n${{ steps.convert-json-to-md.outputs.table }}\n\n${{ steps.quality-gate.outputs.quality-gate-status }}" \
|
payload=$(jq -n --arg body "SonarQube analysis results:\n\n${{ env.SQ_RESULTS }}\n\n${{ env.QG_STATUS }}" \
|
||||||
--argjson position 0 \
|
|
||||||
'{
|
'{
|
||||||
body: "string",
|
body: $body
|
||||||
comments: [
|
|
||||||
{
|
|
||||||
body: $body,
|
|
||||||
old_position: $position,
|
|
||||||
new_position: $position
|
|
||||||
}
|
|
||||||
],
|
|
||||||
event: "COMMENT"
|
|
||||||
}')
|
}')
|
||||||
echo "${RINOA_GITEA_URL}/api/v1/repos/${{ github.repository }}/pulls/${PR_NUMBER}/reviews"
|
echo "${{ vars.RINOA_GITEA_URL }}/api/v1/repos/${{ github.repository }}/pulls/${PR_NUMBER}/reviews"
|
||||||
echo "${payload}"
|
echo "${payload}"
|
||||||
curl "${RINOA_GITEA_URL}/api/v1/repos/${{ github.repository }}/pulls/${PR_NUMBER}/reviews" \
|
curl "${{ vars.RINOA_GITEA_URL }}/api/v1/repos/${{ github.repository }}/pulls/${PR_NUMBER}/reviews" \
|
||||||
-X POST \
|
-X 'POST' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: token ${{ secrets.BOT_GITEA_TOKEN }}' \
|
-H 'Authorization: token ${{ secrets.BOT_GITEA_TOKEN }}' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
|
|||||||
Reference in New Issue
Block a user