Skip to content

neuralliquid/autopr-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AutoPR Engine πŸ€–

AI-Powered GitHub PR Automation and Issue Management

[![PyPI version](https://badge.fury.io/py/autopr-engine.svg)](https://badge.fury.io/py/autopr-engine) [![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![GitHub Marketplace](https://img.shields.io/badge/GitHub-Marketplace-blue)](https://github.com/marketplace/autopr-engine)

AutoPR Engine is a comprehensive AI-powered automation platform that transforms GitHub pull request workflows through intelligent analysis, issue creation, and multi-agent collaboration.


🌟 Features

πŸ€– AI-Powered PR Analysis

  • Multi-Agent Review: CodeRabbit, GitHub Copilot, AI TypeScript Check integration
  • Platform Detection: Detects 25+ development platforms (Replit, Bolt, Lovable, etc.)
  • Intelligent Issue Classification: Security, performance, bugs, features
  • Quality Gates: Automated validation before merge

πŸ”— Smart Integrations

  • Communication: Slack (Axolo), Microsoft Teams, Discord, Notion
  • Project Management: Linear, GitHub Issues, Jira
  • AI Tools: AutoGen multi-agent, configurable LLM providers
  • Monitoring: Sentry, DataDog, Prometheus metrics

⚑ Advanced Automation

  • Issue Auto-Creation: GitHub Issues and Linear tickets
  • AI Tool Assignment: Route issues to specialized AI tools
  • Workflow Orchestration: 20+ pre-built workflows
  • Memory System: Learn from past interactions and patterns

πŸš€ Quick Start

Installation

# Install from PyPI
pip install autopr-engine

# Or install with all features
pip install "autopr-engine[full]"

# Docker deployment
docker run -d \
  -e GITHUB_TOKEN=your_token \
  -e OPENAI_API_KEY=your_key \
  -p 8080:8080 \
  neuralliquid/autopr-engine:latest

Basic Configuration

# autopr_config.py
from autopr import AutoPREngine

# Initialize engine
engine = AutoPREngine({
    'github_token': 'your_github_token',
    'openai_api_key': 'your_openai_key',
    'repositories': ['owner/repo'],
    'integrations': {
        'slack': {
            'webhook_url': 'your_slack_webhook',
            'channel': '#pr-reviews'
        },
        'linear': {
            'api_key': 'your_linear_key',
            'team_id': 'your_team_id'
        }
    }
})

# Start processing
await engine.start()

GitHub Action Integration

# .github/workflows/autopr.yml
name: AutoPR Analysis
on:
  pull_request:
    types: [opened, synchronize]

jobs:
  autopr:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: neuralliquid/autopr-engine@v1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          openai-api-key: ${{ secrets.OPENAI_API_KEY }}
          linear-api-key: ${{ secrets.LINEAR_API_KEY }}

πŸ“– Documentation

Core Concepts

Platform-Specific Guides

Advanced Topics


πŸ—οΈ Architecture

graph TB
    A[GitHub PR Event] --> B[AutoPR Engine]
    B --> C[Platform Detector]
    B --> D[AI Analysis Engine]

    D --> E[CodeRabbit Integration]
    D --> F[GitHub Copilot]
    D --> G[AI TypeScript Check]

    C --> H[Workflow Router]
    H --> I[Issue Creator]
    H --> J[AI Assignment]

    I --> K[GitHub Issues]
    I --> L[Linear Tickets]

    J --> M[Communication Hub]
    M --> N[Slack/Axolo]
    M --> O[Teams/Discord]

    subgraph "AI Layer"
        P[AutoGen Multi-Agent]
        Q[Configurable LLM]
        R[Memory System]
    end

    subgraph "Quality Gates"
        S[Security Scanning]
        T[Performance Analysis]
        U[Test Execution]
    end
Loading

πŸ› οΈ Development

Setup Development Environment

# Clone repository
git clone https://github.com/neuralliquid/autopr-engine.git
cd autopr-engine

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest

# Run with live reload
python -m autopr.server --reload

Project Structure

autopr-engine/
β”œβ”€β”€ autopr/                 # Core engine package
β”‚   β”œβ”€β”€ actions/            # 50+ automation actions
β”‚   β”œβ”€β”€ workflows/          # Pre-built workflow definitions
β”‚   β”œβ”€β”€ integrations/       # External service integrations
β”‚   β”œβ”€β”€ ai/                 # AI and LLM components
β”‚   β”œβ”€β”€ memory/             # Learning and memory systems
β”‚   β”œβ”€β”€ quality/            # Quality gates and validation
β”‚   └── server/             # Web server and API
β”œβ”€β”€ tests/                  # Comprehensive test suite
β”œβ”€β”€ docs/                   # Documentation
β”œβ”€β”€ docker/                 # Container definitions
β”œβ”€β”€ scripts/                # Utility scripts
β”œβ”€β”€ examples/               # Usage examples
β”œβ”€β”€ requirements.txt        # Production dependencies
β”œβ”€β”€ requirements-dev.txt    # Development dependencies
β”œβ”€β”€ setup.py               # Package configuration
β”œβ”€β”€ pyproject.toml         # Modern Python packaging
β”œβ”€β”€ Dockerfile             # Container build
β”œβ”€β”€ docker-compose.yml     # Local development
└── README.md              # This file

Testing

# Run all tests
pytest

# Run with coverage
pytest --cov=autopr --cov-report=html

# Run specific test categories
pytest tests/actions/      # Action tests
pytest tests/workflows/    # Workflow tests
pytest tests/integration/  # Integration tests

# Run performance tests
pytest tests/performance/ -v

πŸ”§ Configuration

Environment Variables

# Core Configuration
GITHUB_TOKEN=ghp_xxxxxxxxxxxx           # GitHub API token
OPENAI_API_KEY=sk-xxxxxxxx              # OpenAI API key
AUTOPR_LOG_LEVEL=INFO                   # Logging level

# Optional AI Providers
ANTHROPIC_API_KEY=sk-ant-xxxxxxxx       # Claude API key
MISTRAL_API_KEY=xxxxxxxx                # Mistral API key
GROQ_API_KEY=gsk_xxxxxxxx               # Groq API key

# Integrations
SLACK_WEBHOOK_URL=https://hooks.slack.com/...  # Slack notifications
LINEAR_API_KEY=lin_api_xxxxxxxx         # Linear integration
AXOLO_WORKSPACE_URL=https://...         # Axolo integration

# Infrastructure
REDIS_URL=redis://localhost:6379        # Caching and state
DATABASE_URL=postgresql://...           # PostgreSQL database
SENTRY_DSN=https://...                  # Error tracking

Configuration File

# autopr.yml
repositories:
  - owner: neuralliquid
    repos: ["vv-landing", "vv-backend"]

workflows:
  - name: "pr_review_analysis"
    triggers: ["pull_request.opened", "pull_request.synchronize"]
    actions:
      - platform_detector
      - ai_analysis
      - issue_creator
      - team_notification

integrations:
  slack:
    enabled: true
    channels:
      pr_reviews: "#pr-reviews"
      security_alerts: "#security"

  linear:
    enabled: true
    team_id: "VV"
    project_templates:
      security: "Security Issues"
      performance: "Performance Optimization"

ai_providers:
  default: "openai"
  fallback_order: ["openai", "anthropic", "mistral"]
  models:
    openai: "gpt-4"
    anthropic: "claude-3-sonnet-20240229"

πŸ”Œ Integrations

Communication Platforms

Project Management

AI & Development Tools


πŸ“Š Monitoring & Observability

Built-in Metrics

  • PR processing times and success rates
  • AI tool performance and accuracy
  • Issue creation and resolution tracking
  • Integration health monitoring

Supported Monitoring

  • Prometheus metrics collection
  • Grafana dashboards
  • Sentry error tracking
  • DataDog APM integration
  • Custom webhooks for external systems

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests for new functionality
  5. Run the test suite (pytest)
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

Code Standards

  • Follow [PEP 8](https://peps.python.org/pep-0008/) style guidelines
  • Add type hints for all functions
  • Write comprehensive tests for new features
  • Update documentation for user-facing changes

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • AutoGen team for multi-agent AI framework
  • CodeRabbit for AI code review integration
  • Axolo team for Slack PR automation
  • GitHub for the platform and APIs
  • OpenAI and Anthropic for AI capabilities
  • All our contributors and community members

πŸ“ž Support


Made with ❀️ by the NeuralLiquid team