Skip to content

Full PR assistance from pr creation to review and merging.

License

Notifications You must be signed in to change notification settings

Arnabdaz/PR_Buddy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

14 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ PR Buddy - AI-Powered Pull Request Assistant

Version MCP Cursor AI

๐Ÿ“‘ Table of Contents

๐ŸŽฏ Overview

PR Buddy is an advanced AI-powered pull request management system that seamlessly integrates with your development workflow through the Model Context Protocol (MCP). It combines four powerful MCP servers with intelligent AI rules to automate and enhance your PR lifecycle - from creation through review to merging.

What Makes PR Buddy Special?

  • ๐Ÿค– AI-Driven Automation - Intelligent PR creation, review, and updates using Cursor's AI agents
  • ๐Ÿ”’ Security-First - Built-in CVE scanning and vulnerability detection
  • ๐Ÿ”— Full Integration - Seamless GitHub, Git, Jira, and security tool integration
  • โšก Zero Context Switching - Everything happens within your IDE

โœจ Key Features

Feature Description
Smart PR Creation Automatically generates PR descriptions, links Jira tickets, and validates changes
Comprehensive Reviews AI-powered code review with bug detection, security scanning, and compliance checks
Safe Updates Intelligent PR modifications that preserve important information
CVE Scanning Real-time vulnerability detection in dependencies and code
Jira Integration Automatic ticket linking, requirement verification, and status updates
GitHub Actions Workflow management, CI/CD integration, and automated testing

๐Ÿ“ Repository Structure

pr-buddy/
โ”œโ”€โ”€ README.md                    # You are here!
โ”œโ”€โ”€ setup_pr_buddy.sh           # One-click installation script
โ”œโ”€โ”€ docs/                       # Detailed documentation
โ”‚   โ”œโ”€โ”€ PREREQUISITES.md        # System requirements & tools
โ”‚   โ”œโ”€โ”€ SETUP_GITHUB.md        # GitHub token setup guide
โ”‚   โ”œโ”€โ”€ SETUP_JIRA.md          # Jira integration guide
โ”‚   โ””โ”€โ”€ TROUBLESHOOTING.md     # Common issues & solutions
โ”œโ”€โ”€ rules/                      # AI agent rules for Cursor
โ”‚   โ”œโ”€โ”€ pr-creation.mdc        # PR creation assistant
โ”‚   โ”œโ”€โ”€ pr-review.mdc          # PR review assistant
โ”‚   โ””โ”€โ”€ pr-update.mdc          # PR update assistant
โ””โ”€โ”€ servers/                    # MCP servers (git submodules)
    โ”œโ”€โ”€ cve-search/            # CVE vulnerability scanner
    โ”œโ”€โ”€ git/                   # Git operations server
    โ”œโ”€โ”€ github-mcp-server/     # GitHub integration
    โ””โ”€โ”€ jira-mcp/             # Jira integration

๐Ÿš€ Quick Start

Prerequisites

Before starting, ensure you have:

  • โœ… Python 3.10+
  • โœ… Git
  • โœ… Cursor IDE (latest version)
  • โœ… Go 1.21+ or Docker (for GitHub server)

๐Ÿ‘‰ Detailed Prerequisites Guide

Installation

# 1. Clone the repository with submodules
git clone --recursive https://github.com/YOUR_USERNAME/pr-buddy.git
cd pr-buddy

# 2. Run the interactive setup script
./setup_pr_buddy.sh

# 3. Copy the generated configuration to Cursor
cp ~/.pr-buddy/mcp.json ~/.cursor/mcp.json

# 4. Restart Cursor and enable Agent Mode

The setup script will:

  • โœ… Check all system requirements
  • โœ… Install missing dependencies
  • โœ… Configure all MCP servers
  • โœ… Set up authentication tokens
  • โœ… Install AI rules globally
  • โœ… Test your connections

๐Ÿ“– Documentation

Setup Guides

Guide Description
๐Ÿ“‹ Prerequisites System requirements, tool installation, and environment setup
๐Ÿ” GitHub Setup Creating and configuring GitHub Personal Access Tokens
๐ŸŽซ Jira Setup Setting up Jira API tokens and integration
๐Ÿ”ง Troubleshooting Solutions for common issues and debugging tips

Quick References

Document Description
๐Ÿ“œ Quick Reference Command cheat sheet and shortcuts
๐Ÿ—๏ธ Architecture Detailed system design and diagrams
๐Ÿ“ ASCII Diagrams Architecture diagrams in ASCII format
๐Ÿค Contributing How to contribute to PR Buddy

๐Ÿ’ก Usage Examples

Creating a Pull Request

@pr-creation.mdc Create a PR for the authentication feature on master branch.
The changes are in feature/auth-oauth branch. This addresses Jira ticket DSE-1234.

Reviewing a Pull Request

@pr-review.mdc Review PR Sense/cloudera-sense/789 thoroughly.
Check for security vulnerabilities, bugs, and Jira compliance.

Updating a Pull Request

@pr-update.mdc Update PR Sense/cloudera-sense/456 description
with the latest Jira requirements while preserving test evidence.

Quick Commands

Command Description
@pr-creation.mdc Activate PR creation assistant
@pr-review.mdc Activate PR review assistant
@pr-update.mdc Activate PR update assistant

๐ŸŽฎ How PR Buddy Works

graph LR
    A[Developer] --> B[Cursor IDE]
    B --> C{PR Buddy Rules}
    C --> D[Git Server]
    C --> E[GitHub Server]
    C --> F[Jira Server]
    C --> G[CVE Scanner]

    D --> H[Local Operations]
    E --> I[PR Management]
    F --> J[Ticket Sync]
    G --> K[Security Scan]

    style C fill:#4CAF50,stroke:#2E7D32,color:#fff
    style B fill:#2196F3,stroke:#1565C0,color:#fff
Loading

๐Ÿ”ง Advanced Configuration

Customizing for Your Workflow

  1. Global Rules (for all projects):

    cp rules/*.mdc ~/.cursor/rules/
  2. Project-Specific Rules:

   mkdir -p .cursor/rules
   cp /path/to/pr-buddy/rules/*.mdc .cursor/rules/
  1. Custom Toolsets (optimize performance):
{
  "env": {
    "GITHUB_TOOLSETS": "repos,pull_requests,issues"
  }
}

Security Best Practices

  • ๐Ÿ” Use environment variables for tokens
  • ๐Ÿ”„ Rotate tokens every 90 days
  • ๐Ÿ›ก๏ธ Use fine-grained GitHub tokens
  • ๐Ÿ“ Enable audit logging

๐Ÿ› Getting Help

Quick Fixes

Support Channels

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for:

  • Code of conduct
  • Development setup
  • Submission guidelines
  • Coding standards

๐Ÿ“„ License

PR Buddy is licensed under the MIT License. See LICENSE for details.

๐Ÿ™ Acknowledgments

  • Model Context Protocol team for the MCP framework
  • Cursor team for the amazing IDE integration
  • GitHub, Atlassian, and CIRCL for their APIs
  • All contributors and users of PR Buddy

Built with โค๏ธ for developers who value quality and efficiency
PR Buddy - Your AI-powered pull request companion

About

Full PR assistance from pr creation to review and merging.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages