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 Reviewer プロジェクトをセットアップするための手順を段階的に説明します。

前提条件

  • curl (MacOS/Linux用)
  • システムにPython 3.xがインストールされている

セットアップ手順

ステップ1: uvをインストールする

MacOS/Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

🔁 その後、ターミナルを再起動して、 uvコマンドが使用できることを確認します。


ステップ2: プロジェクトの作成と設定

MacOS/Linux:

# 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. トークンをGITHUB_TOKENとして.envファイルにコピーして貼り付けます。

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