Skip to main content
Glama

PR Reviewer

PR 审阅者设置指南

本指南提供了设置 PR Reviewer 项目的分步说明,其中包括与 GitHub 和 Notion 的集成。

先决条件

  • 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. 将令牌复制并粘贴到您的.env文件中作为GITHUB_TOKEN
概念整合:
  1. 转到Notion Integrations
  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

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.

一种与 GitHub 和 Notion 集成的工具,用于分析和审查拉取请求,从而实现 Notion 中的自动代码审查和文档记录。

  1. 先决条件
    1. 设置说明
      1. 步骤1:安装uv
      2. 步骤 2:创建并设置项目
      3. 步骤 3:创建requirements.txt并从中安装
      4. 步骤4:设置环境变量
      5. 步骤 5:创建主脚本
      6. 步骤6:运行应用程序

    Related MCP Servers

    • -
      security
      F
      license
      -
      quality
      Enables interaction with GitHub through the GitHub API, supporting file operations, repository management, advanced search, and issue tracking with comprehensive error handling and automatic branch creation.
      Last updated -
      9
      1
      TypeScript
    • A
      security
      A
      license
      A
      quality
      A TypeScript server that analyzes GitHub Pull Requests using the Model-Controller-Presenter pattern.
      Last updated -
      1
      5
      TypeScript
      MIT License
    • -
      security
      F
      license
      -
      quality
      An MCP service that enables creating GitHub Pull Requests and adding code review comments using GitHub CLI, eliminating the need to manually handle authentication and permissions.
      Last updated -
      JavaScript
      • Apple
      • Linux
    • -
      security
      F
      license
      -
      quality
      Enables comprehensive GitHub operations through natural language including file management, repository administration, issue tracking, and advanced code searching.
      Last updated -
      22,573
      1
      TypeScript

    View all related MCP servers

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/KalyankumarKonduru/MCP_test'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server