Skip to content

Commit 0a8deb3

Browse files
committed
change lang
1 parent b4b1df8 commit 0a8deb3

1 file changed

Lines changed: 27 additions & 46 deletions

File tree

.github/workflows/pr-agent.yml

Lines changed: 27 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: PR-Agent (Self-hosted Qwen)
1+
# .github/workflows/pr-agent.yml
2+
name: PR-Agent Auto Review (CLI)
23

34
on:
45
pull_request:
@@ -18,60 +19,40 @@ jobs:
1819
steps:
1920
- name: Run PR-Agent
2021
env:
22+
# CLI 방식은 __ (double underscore) 형식
2123
GITHUB__USER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22-
OPENAI__KEY: ${{ secrets.OPENAI_KEY }}
24+
OPENAI__KEY: "sk-dummy"
2325
OPENAI__API_BASE: "http://localhost:8888/v1"
24-
26+
2527
CONFIG__MODEL: "openai/Qwen/Qwen3-Coder-Next-FP8"
2628
CONFIG__MODEL_TURBO: "openai/Qwen/Qwen3-Coder-Next-FP8"
2729
CONFIG__FALLBACK_MODELS: '["openai/Qwen/Qwen3-Coder-Next-FP8"]'
2830
CONFIG__CUSTOM_MODEL_MAX_TOKENS: "32768"
29-
30-
# 리뷰 상세도 높이기
31-
PR_REVIEWER__NUM_CODE_SUGGESTIONS: "5"
32-
PR_REVIEWER__INLINE_CODE_COMMENTS: "true"
33-
PR_REVIEWER__REQUIRE_SCORE_REVIEW: "true"
34-
PR_REVIEWER__REQUIRE_TESTS_REVIEW: "true"
31+
CONFIG__RESPONSE_LANGUAGE: "ko-KR"
32+
33+
PR_REVIEWER__NUM_CODE_SUGGESTIONS: "3"
3534
PR_REVIEWER__REQUIRE_SECURITY_REVIEW: "true"
36-
PR_REVIEWER__REQUIRE_ESTIMATE_EFFORT_TO_REVIEW: "true"
37-
PR_REVIEWER__PERSISTENT_COMMENT: "true"
38-
PR_REVIEWER__EXTRA_INSTRUCTIONS: "코드의 버그, 성능 문제, 메모리 누수, 스레드 안전성 문제를 자세히 분석해주세요. 각 이슈에 대해 구체적인 수정 방법도 제안해주세요."
39-
35+
PR_REVIEWER__EXTRA_INSTRUCTIONS: "버그, 성능 문제, 메모리 누수를 분석해주세요."
36+
37+
PR_CODE_SUGGESTIONS__NUM_CODE_SUGGESTIONS: "5"
38+
PR_CODE_SUGGESTIONS__EXTRA_INSTRUCTIONS: "구체적인 코드 수정안을 제시해주세요."
39+
40+
PR_DESCRIPTION__PUBLISH_LABELS: "true"
41+
PR_DESCRIPTION__ADD_ORIGINAL_USER_DESCRIPTION: "true"
42+
4043
run: |
4144
source ~/pr-agent-env/bin/activate
42-
43-
# PR URL 결정
45+
4446
if [ "${{ github.event_name }}" == "pull_request" ]; then
4547
PR_URL="${{ github.event.pull_request.html_url }}"
46-
47-
# PR 이벤트: 자동으로 describe, review, improve 실행
48-
pr-agent --pr_url "$PR_URL" describe
49-
pr-agent --pr_url "$PR_URL" review
50-
pr-agent --pr_url "$PR_URL" improve
51-
52-
elif [ "${{ github.event_name }}" == "issue_comment" ]; then
53-
# 코멘트가 PR에 달린 건지 확인
54-
if [ -z "${{ github.event.issue.pull_request.url }}" ]; then
55-
echo "Not a PR comment, skipping"
56-
exit 0
57-
fi
58-
59-
PR_URL="${{ github.event.issue.pull_request.url }}"
60-
COMMENT="${{ github.event.comment.body }}"
61-
62-
echo "Comment: $COMMENT"
63-
64-
# 명령어 파싱
65-
if [[ "$COMMENT" == "/review"* ]]; then
66-
pr-agent --pr_url "$PR_URL" review
67-
elif [[ "$COMMENT" == "/describe"* ]]; then
68-
pr-agent --pr_url "$PR_URL" describe
69-
elif [[ "$COMMENT" == "/improve"* ]]; then
70-
pr-agent --pr_url "$PR_URL" improve
71-
elif [[ "$COMMENT" == "/ask "* ]]; then
72-
QUESTION="${COMMENT#/ask }"
73-
pr-agent --pr_url "$PR_URL" ask "$QUESTION"
74-
else
75-
echo "No valid command found"
76-
fi
48+
else
49+
# issue_comment 이벤트 — PR URL 추출
50+
PR_URL="${{ github.event.issue.pull_request.html_url }}"
7751
fi
52+
53+
echo "PR URL: $PR_URL"
54+
55+
# 자동 실행: describe → review → improve
56+
pr-agent --pr_url "$PR_URL" describe
57+
pr-agent --pr_url "$PR_URL" review
58+
pr-agent --pr_url "$PR_URL" improve

0 commit comments

Comments
 (0)