diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 7e870deb..3e753d0e 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -20,12 +20,19 @@ jobs: run: | echo "REVIEW_API_URL=${{ secrets.REVIEW_API_URL }}" >> $GITHUB_ENV + - name: Debug REVIEW_API_URL + run: echo "REVIEW_API_URL=$REVIEW_API_URL" + - name: API calling for CodeReview id: api_call run: | - REVIEW_RESPONSE=$(curl -X POST ${REVIEW_API_URL}) - echo "Review Response: $REVIEW_RESPONSE" - echo "REVIEW_RESPONSE=$REVIEW_RESPONSE" >> $GITHUB_ENV + if [ -z "$REVIEW_API_URL" ]; then + echo "REVIEW_API_URL is not set" + exit 1 + fi + REVIEW_RESPONSE=$(curl -X POST $REVIEW_API_URL) + echo "Review Response: $REVIEW_RESPONSE" + echo "REVIEW_RESPONSE=$REVIEW_RESPONSE" >> $GITHUB_ENV - name: Get Git Diff id: git_diff