简体中文 | English
A CLI tool to fetch, filter, and summarize GitHub issues, with one-line summaries generated by LLMs (e.g., OpenAI).
-
Install dependencies:
pip install -r requirements.txt
-
Run with one command:
python llm-issue.py owner/repo --max-issues 30
- Replace
owner/repowith the target GitHub repository, e.g.AstrBotDevs/AstrBot. --max-issuescontrols how many open issues to fetch (default 50, recommended for large repos).- No need to manually export environment variables!
- If
GH_TOKENorOPENAI_API_KEYis missing, you will be prompted to enter them once, and they will be saved to.envfor future runs.
- Replace
-
Results:
- Output files are saved to the
output/directory automatically. - Includes a Markdown summary and filtered issues in JSON.
- Output files are saved to the
- Fetches open issues from any GitHub repository
- Filters out assigned, closed, or noisy issues
- Classifies issues by type and priority
- Generates one-line summaries for each issue using LLM (e.g., OpenAI GPT)
- Outputs a Markdown table and project overview
- Caches API responses and summaries for better performance
- Supports batch processing with automatic rate limiting
- Quality control for generated summaries
- Fallback to local summarization when LLM is unavailable
--max-issues NLimit the number of open issues to fetch (default 50). Useful for large repositories to speed up the process.
You can still use environment variables or .env to customize behavior:
# Caching options
CACHE_DB_PATH=.cache/cache.db # Cache database location
CACHE_MAX_MEMORY_ITEMS=1000 # Max items in memory cache
CACHE_CLEANUP_INTERVAL=3600 # Cache cleanup interval (seconds)
# LLM options
LLM_CONCURRENCY_LIMIT=10 # Max concurrent LLM requests
OPENAI_BASE_URL=https://api.openai.com/v1 # API endpoint
MODEL_NAME=gpt-3.5-turbo # Model to use- Edit
config.pyto customize:- Keywords for issue classification
- Priority rules and labels
- LLM prompt templates
- Filter rules for issues
The tool generates:
- A project overview with issue statistics
- A detailed Markdown table with:
- Issue number and type
- Priority level
- One-line summary
- Key labels
- Creation date
- Direct link
Example output:
# owner/repo Issues Overview
Currently has **50** open issues (20 bugs / 15 feature requests), average priority P1, last updated on 2024-03-20.
| #Issue | Type | Priority | Title | Summary | Key Labels | Created | Link |
|--------|------|----------|-------|---------|------------|---------|------|
| #123 | Bug | P1 | Login fails | "Login page error under high concurrency" | backend, critical | 2024-03-19 | 🔗 |- Python 3.8+
- httpx
- typer
- pydantic
- rich
- openai
- python-dotenv
Contributions are welcome! Please feel free to submit a Pull Request.
Apache License 2.0