Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Repo Intelligence Bot

Automated GitHub repository monitoring system built with LangGraph, GitHub REST API, and OpenAI API.

Monitors all your GitHub repos, summarizes commits and PRs using AI, and sends formatted notifications to Slack.


🏗️ Architecture

Scheduler → LangGraph Orchestrator
               ├── Commit Agent  → GitHub API → OpenAI → commit summary
               ├── PR Agent      → GitHub API → OpenAI → PR summary
               └── Notifier Agent → Slack Webhook

🚀 Setup

1. Clone & install dependencies

cd repo_intelligence_bot
pip install -r requirements.txt

2. Configure environment

cp .env.example .env
# Fill in your keys

3. Run

python main.py

⚙️ Environment Variables

Variable Description
GITHUB_TOKEN GitHub Personal Access Token (classic, repo scope)
GITHUB_REPO_OWNER Your GitHub username
OPENAI_API_KEY OpenAI API key
WEBHOOK_URL Slack Incoming Webhook URL
POLL_INTERVAL_SECONDS How often to scan (default: 300 = 5 min)
MAX_REPOS Max repos to monitor (default: 20)
REPO_TYPE all, public, or private
SKIP_ARCHIVED Skip archived repos (default: true)
SKIP_FORKS Skip forked repos (default: true)

📁 Project Structure

repo_intelligence_bot/
├── .env                        ← your secrets (never commit this)
├── .env.example                ← template
├── .gitignore
├── requirements.txt
├── main.py                     ← entry point + polling loop
├── graph/
│   ├── state.py                ← LangGraph state definition
│   ├── orchestrator.py         ← graph builder + runner
│   └── nodes/
│       ├── commit_agent.py     ← fetches + summarizes commits
│       ├── pr_agent.py         ← fetches + summarizes PRs
│       └── notifier_agent.py   ← sends Slack notification
└── utils/
    ├── github_client.py        ← GitHub REST API wrapper
    ├── openai_client.py        ← OpenAI summarization functions
    └── webhook.py              ← Slack webhook formatter + sender

💡 Tips

  • Set POLL_INTERVAL_SECONDS=60 for testing, bump to 300+ for production
  • Set MAX_REPOS=5 to test on a few repos first before going all-in
  • The bot uses gpt-4o-mini by default — fast and cheap for this use case
  • Add #repo-alerts as a dedicated Slack channel to keep things clean

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages