PR Reviewer

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Manages environment variables for configuring GitHub and Notion API authentication and other sensitive settings.

  • Enables automated review of Pull Requests through the GitHub API, with capabilities to analyze code changes and provide feedback.

  • Integrates with Notion's workspace to store, organize, and track PR review data using Notion's database capabilities.

PR 리뷰어 설정 가이드

이 가이드에서는 GitHub 및 Notion과의 통합을 포함하여 PR 검토자 프로젝트를 설정하는 단계별 지침을 제공합니다.

필수 조건

  • curl (MacOS/Linux용)
  • 시스템에 Python 3.x가 설치되어 있습니다

설치 지침

1단계: uv 설치

MacOS/리눅스:

지엑스피1

🔁 uv 명령을 사용할 수 있는지 확인하려면 터미널을 다시 시작하세요.


2단계: 프로젝트 생성 및 설정

MacOS/리눅스:

# Create a new directory for the project uv init pr_reviewer cd pr_reviewer # Create and activate a virtual environment uv venv source .venv/bin/activate # Install core dependencies uv add "mcp[cli]" requests python-dotenv notion-client

3단계: requirements.txt 만들고 이를 통해 설치

다음 내용으로 requirements.txt 라는 파일을 만듭니다.

# Core dependencies for PR Analyzer requests>=2.31.0 # For GitHub API calls python-dotenv>=1.0.0 # For environment variables mcp[cli]>=1.4.0 # For MCP server functionality notion-client>=2.3.0 # For Notion integration

패키지를 설치하세요:

uv pip install -r requirements.txt pip install -r requirements.txt

4단계: 환경 변수 설정

루트 디렉토리에 .env 파일을 만들고 다음을 추가합니다.

GITHUB_TOKEN=your_github_token NOTION_API_KEY=your_notion_api_key NOTION_PAGE_ID=your_notion_page_id

GitHub 토큰:

  1. GitHub → 설정 → 개발자 설정 → 개인 액세스 토큰으로 이동합니다.
  2. "새로운 토큰 생성(클래식)"을 클릭합니다.
  3. 다음 범위를 활성화하세요.
    • read:org
    • read:repo_hook
    • repo
  4. 토큰을 복사하여 .env 파일에 GITHUB_TOKEN 으로 붙여넣습니다.

Notion 통합:

  1. Notion 통합 으로 이동하세요.
  2. "새로운 통합"을 클릭하고 유형을 내부 로 설정합니다.
  3. 작업 공간에 추가하세요.
  4. 내부 통합 비밀번호를 NOTION_API_KEY 로 복사합니다.
  5. 통합 URL 끝에 있는 UUID를 NOTION_PAGE_ID 로 복사합니다.

5단계: 메인 스크립트 만들기

서버 로직을 위한 빈 스크립트 파일을 만듭니다.

touch pr_reviewer

이 파일에 애플리케이션 로직을 추가하세요.


6단계: 애플리케이션 실행

프로젝트를 실행하려면 환경이 활성화되어 있고 .env 구성되어 있는지 확인하세요.

python pr_reviewer.py

-
security - not tested
F
license - not found
-
quality - not tested

GitHub 및 Notion과 통합되어 풀 리퀘스트를 분석하고 검토하고 Notion에서 자동화된 코드 검토 및 문서화를 가능하게 하는 도구입니다.

  1. Prerequisites
    1. Setup Instructions
      1. Step 1: Install uv
      2. Step 2: Create and Set Up the Project
      3. Step 3: Create requirements.txt and Install from It
      4. Step 4: Set Up Environment Variables
      5. Step 5: Create the Main Script
      6. Step 6: Run the Application
    ID: hdyjdwqhhl