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.
Scheduler → LangGraph Orchestrator
├── Commit Agent → GitHub API → OpenAI → commit summary
├── PR Agent → GitHub API → OpenAI → PR summary
└── Notifier Agent → Slack Webhook
cd repo_intelligence_bot
pip install -r requirements.txtcp .env.example .env
# Fill in your keyspython main.py| 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) |
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
- Set
POLL_INTERVAL_SECONDS=60for testing, bump to300+ for production - Set
MAX_REPOS=5to test on a few repos first before going all-in - The bot uses
gpt-4o-miniby default — fast and cheap for this use case - Add
#repo-alertsas a dedicated Slack channel to keep things clean