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.

Guía de configuración del revisor de relaciones públicas

Esta guía proporciona instrucciones paso a paso para configurar el proyecto PR Reviewer, que incluye integraciones con GitHub y Notion.

Prerrequisitos

  • curl (para MacOS/Linux)
  • Python 3.x instalado en su sistema

Instrucciones de configuración

Paso 1: Instalar uv

MacOS/Linux:

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

🔁 Reinicie su terminal luego para asegurarse de que el comando uv esté disponible.


Paso 2: Crear y configurar el proyecto

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

Paso 3: Crea requirements.txt e instálalo desde allí

Crea un archivo llamado requirements.txt con el siguiente contenido:

# 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

Instalar los paquetes:

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

Paso 4: Configurar variables de entorno

Cree un archivo .env en el directorio raíz y agregue lo siguiente:

GITHUB_TOKEN=your_github_token NOTION_API_KEY=your_notion_api_key NOTION_PAGE_ID=your_notion_page_id

Token de GitHub:

  1. Vaya a GitHub → Configuración → Configuración de desarrollador → Tokens de acceso personal.
  2. Haga clic en "Generar nuevo token (clásico)" .
  3. Habilitar estos ámbitos:
    • read:org
    • read:repo_hook
    • repo
  4. Copie y pegue el token en su archivo .env como GITHUB_TOKEN .

Integración de nociones:

  1. Vaya a Integraciones de Notion .
  2. Haga clic en “Nueva integración” y configure el tipo en Interno .
  3. Añadelo a tu espacio de trabajo.
  4. Copie el secreto de integración interna como NOTION_API_KEY .
  5. Copie el UUID al final de la URL de integración como NOTION_PAGE_ID .

Paso 5: Crear el script principal

Cree un archivo de script vacío para la lógica de su servidor:

touch pr_reviewer

Agregue la lógica de su aplicación dentro de este archivo.


Paso 6: Ejecutar la aplicación

Para ejecutar el proyecto, asegúrese de que su entorno esté activado y que .env esté configurado:

python pr_reviewer.py

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

Una herramienta que se integra con GitHub y Notion para analizar y revisar solicitudes de extracción, lo que permite revisiones de código automatizadas y documentación en 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