Skip to content

PR-Agent Auto Review (CLI) #14

PR-Agent Auto Review (CLI)

PR-Agent Auto Review (CLI) #14

Workflow file for this run

name: PR-Agent (Self-hosted Nemotron)
on:
pull_request:
types: [opened, reopened, ready_for_review, synchronize]
issue_comment:
types: [created]
jobs:
pr_agent_job:
if: ${{ github.event.sender.type != 'Bot' }}
runs-on: self-hosted
permissions:
issues: write
pull-requests: write
contents: write
steps:
- name: Run PR-Agent
env:
GITHUB__USER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI__KEY: ${{ secrets.OPENAI_KEY }}
OPENAI__API_BASE: "http://localhost:8888/v1"
CONFIG__MODEL: "openai/Qwen/Qwen3-Coder-Next-FP8"
CONFIG__MODEL_TURBO: "openai/Qwen/Qwen3-Coder-Next-FP8"
CONFIG__FALLBACK_MODELS: '["openai/Qwen/Qwen3-Coder-Next-FP8"]'
CONFIG__CUSTOM_MODEL_MAX_TOKENS: "32768"
# 리뷰 상세도 높이기
PR_REVIEWER__NUM_CODE_SUGGESTIONS: "5"
PR_REVIEWER__INLINE_CODE_COMMENTS: "true"
PR_REVIEWER__REQUIRE_SCORE_REVIEW: "true"
PR_REVIEWER__REQUIRE_TESTS_REVIEW: "true"
PR_REVIEWER__REQUIRE_SECURITY_REVIEW: "true"
PR_REVIEWER__REQUIRE_ESTIMATE_EFFORT_TO_REVIEW: "true"
PR_REVIEWER__PERSISTENT_COMMENT: "true"
PR_REVIEWER__EXTRA_INSTRUCTIONS: "코드의 버그, 성능 문제, 메모리 누수, 스레드 안전성 문제를 자세히 분석해주세요. 각 이슈에 대해 구체적인 수정 방법도 제안해주세요."
run: |
source ~/pr-agent-env/bin/activate
# PR URL 결정 (pull_request vs issue_comment 이벤트)
if [ "${{ github.event_name }}" == "pull_request" ]; then
PR_URL="${{ github.event.pull_request.html_url }}"
else
PR_URL="${{ github.event.issue.pull_request.url }}"
fi
echo "PR URL: $PR_URL"
pr-agent --pr_url "$PR_URL" review