Removing all the echoes/prints from troubleshooting.
This commit is contained in:
@@ -86,7 +86,6 @@ jobs:
|
|||||||
id: json-cleanup
|
id: json-cleanup
|
||||||
run: |
|
run: |
|
||||||
echo "Cleaning up quality gate response..."
|
echo "Cleaning up quality gate response..."
|
||||||
echo '${{ steps.quality-gate-check.outputs.quality-gate-result }}'
|
|
||||||
echo '${{ steps.quality-gate-check.outputs.quality-gate-result }}' > qg_input.txt
|
echo '${{ steps.quality-gate-check.outputs.quality-gate-result }}' > qg_input.txt
|
||||||
sed -E 's/([a-zA-Z0-9_]+):/\\"\1\\":/g; s/:([^",{}\[\]]+)/:"\1"/g' qg_input.txt > qg_raw.json
|
sed -E 's/([a-zA-Z0-9_]+):/\\"\1\\":/g; s/:([^",{}\[\]]+)/:"\1"/g' qg_input.txt > qg_raw.json
|
||||||
jq -c '.' qg_raw.json > qg_fixed_json.json
|
jq -c '.' qg_raw.json > qg_fixed_json.json
|
||||||
@@ -116,14 +115,10 @@ jobs:
|
|||||||
/g')
|
/g')
|
||||||
payload=$(jq -n \
|
payload=$(jq -n \
|
||||||
--arg body "SonarQube analysis results:
|
--arg body "SonarQube analysis results:
|
||||||
<br>
|
|
||||||
<br>
|
<br>
|
||||||
${{ env.SQ_RESULTS }}" \
|
${{ env.SQ_RESULTS }}" \
|
||||||
'{ body: $body }')
|
'{ body: $body }')
|
||||||
|
|
||||||
echo "Constructed Payload:"
|
|
||||||
echo "$payload"
|
|
||||||
|
|
||||||
response=$(curl -s -o response.json -w "%{http_code}" \
|
response=$(curl -s -o response.json -w "%{http_code}" \
|
||||||
-X POST \
|
-X POST \
|
||||||
-H "Accept: application/json" \
|
-H "Accept: application/json" \
|
||||||
@@ -132,15 +127,6 @@ jobs:
|
|||||||
-d "$payload" \
|
-d "$payload" \
|
||||||
"${RINOA_GITEA_URL}/api/v1/repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}/reviews")
|
"${RINOA_GITEA_URL}/api/v1/repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}/reviews")
|
||||||
|
|
||||||
echo "HTTP Status Code: $response"
|
|
||||||
echo "Response Body:"
|
|
||||||
cat response.json
|
|
||||||
|
|
||||||
if [ "$response" -ne 200 ]; then
|
|
||||||
echo "Error: Failed to post comment. HTTP Status Code: $response"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 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
|
||||||
|
|||||||
Reference in New Issue
Block a user