From e5f33f857047e6e7beaf861a40acf56dc70d963a Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Fri, 20 Dec 2024 06:37:23 -0500 Subject: [PATCH] Removing all the echoes/prints from troubleshooting. --- .gitea/workflows/branch-sonarscan-pr-merge.yml | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/.gitea/workflows/branch-sonarscan-pr-merge.yml b/.gitea/workflows/branch-sonarscan-pr-merge.yml index 3510d99b..b8ec4292 100644 --- a/.gitea/workflows/branch-sonarscan-pr-merge.yml +++ b/.gitea/workflows/branch-sonarscan-pr-merge.yml @@ -86,7 +86,6 @@ jobs: id: json-cleanup run: | 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 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 @@ -116,14 +115,10 @@ jobs: /g') payload=$(jq -n \ --arg body "SonarQube analysis results: -

${{ env.SQ_RESULTS }}" \ '{ body: $body }') - - echo "Constructed Payload:" - echo "$payload" - + response=$(curl -s -o response.json -w "%{http_code}" \ -X POST \ -H "Accept: application/json" \ @@ -132,15 +127,6 @@ jobs: -d "$payload" \ "${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 # merge-pr: # runs-on: ubuntu-latest