Skip to content

AlphaPatchAI/AlphaPatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 AlphaPatch

AI-powered GitHub assistant that analyzes issues and proposes code fixes automatically.

AlphaPatch is an open-source developer tool that integrates directly with GitHub workflows to:

  • 🧠 Understand issues using AI
  • 💡 Suggest solutions
  • 🛠️ Generate code patches
  • 🔁 Open pull requests automatically

✨ Features

  • 📌 Issue Analysis
  • Classifies issues (bug, feature, question)
  • Summarizes problem clearly
  • 🤖 AI-Powered Suggestions
  • Provides detailed explanations
  • Suggests possible fixes
  • 🔧 Patch Generation (WIP)
  • Generates code diffs
  • Prepares pull request drafts
  • 🔄 GitHub Integration
  • Runs via GitHub Actions
  • Automatically comments on new issues

🧠 How It Works

  1. A new issue is opened
  2. GitHub Action is triggered
  3. AlphaPatch:
    • Reads the issue
    • Analyzes the repository
    • Generates a response
  4. Bot posts a comment or creates a PR

Demo1 Demo2

⚙️ Installation

To add AlphaPatch to your repository, use the integration guide and workflow template:

  1. Copy AlphaPatch into your repo (or vendor it).
  2. Run scripts/install.sh to create .github/workflows/alphapatch.yml.
  3. Add required secrets (GEMINI_API_KEY, GEMINI_MODEL).
  4. Open a new issue to trigger AlphaPatch.

⚡ Quickstart

See docs/integration.md for a step-by-step setup, required secrets, and permissions. You can also customize workflow triggers there (issue comments, manual runs, schedules).

🧪 Example Workflow

name: AlphaPatch

on:
issues:
    types: [opened]

permissions:
issues: write
contents: write
pull-requests: write

jobs:
analyze:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Run AlphaPatch
        env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        LLM_PROVIDER: gemini
        GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
        GEMINI_MODEL: ${{ secrets.GEMINI_MODEL }}
        ENABLE_DRAFT_PR: "1"
        ENABLE_LABELS: "1"
        TEST_COMMAND: ""
        TEST_TIMEOUT: "600"
        GIT_AUTHOR_NAME: AlphaPatch Bot
        GIT_AUTHOR_EMAIL: alphapatch-bot@users.noreply.github.com
        GIT_COMMITTER_NAME: AlphaPatch Bot
        GIT_COMMITTER_EMAIL: alphapatch-bot@users.noreply.github.com
        run: python -m bot.main --repo ${{ github.repository }} --issue ${{ inputs.issue_number || github.event.issue.number || vars.ALPHAPATCH_ISSUE_NUMBER }}

📌 Roadmap

  • Issue analysis & response
  • Context-aware repo understanding
  • Code patch generation
  • Auto pull request creation
  • Test validation system
  • Multi-language support

⚠️ Disclaimer

AlphaPatch does not automatically merge changes.

All generated fixes:

  • Require human review
  • May be incorrect or incomplete

🤝 Contributing

We welcome contributions!

  1. Fork the repo
  2. Create a feature branch
  3. Submit a pull request

📜 License

MIT License

🌟 Vision

AlphaPatch aims to become a lightweight, open-source AI assistant for developers — helping teams resolve issues faster without losing control.

About

Open Source AI-powered GitHub assistant that analyzes issues and proposes code fixes automatically.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages