Skip to content

Commit ead8754

Browse files
committed
fix: Create gpt_review.txt
1 parent f21922f commit ead8754

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/code-review.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,15 @@ jobs:
5656
5757
# GPT 리뷰 결과 추출
5858
review_feedback = response.choices[0].message.content
59-
print(review_feedback)
59+
60+
# 리뷰 결과를 gpt_review.txt 파일에 저장
61+
with open('gpt_review.txt', 'w') as output_file:
62+
output_file.write(review_feedback)
6063
EOF
6164
6265
- name: Post review comment on PR
6366
run: |
64-
REVIEW_COMMENT=$(python -c 'import json; print(open("gpt_review.txt").read())')
67+
REVIEW_COMMENT=$(cat gpt_review.txt)
6568
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
6669
-d "{\"body\": \"${REVIEW_COMMENT}\"}" \
6770
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"

0 commit comments

Comments
 (0)