Skip to content

Commit a84d9d0

Browse files
committed
fix: Modify code-review.yml
- json parsing
1 parent 1330aeb commit a84d9d0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/code-review.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ jobs:
6565
- name: Post review comment on PR
6666
run: |
6767
REVIEW_COMMENT=$(cat gpt_review.txt)
68-
echo "Review Comment: $REVIEW_COMMENT" # 코멘트 내용 확인
68+
echo "Review Comment: $REVIEW_COMMENT"
69+
REVIEW_COMMENT_ESCAPED=$(echo "${REVIEW_COMMENT}" | python -c 'import json,sys; print(json.dumps(sys.stdin.read()))')
6970
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
70-
-d "{\"body\": \"${REVIEW_COMMENT}\"}" \
71+
-d "{\"body\": ${REVIEW_COMMENT_ESCAPED}}" \
7172
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"

0 commit comments

Comments
 (0)