GitHub Issue & PR Summarizer Agent
CLI agent that fetches new GitHub issues and PRs, summarizes each one and suggests a label.
2 min read
Fetches new issues/PRs in a repo, generates a summary, and suggests a label.
How it works
github_client.pywraps the GitHub REST API (issues + PRs both come from the/issuesendpoint. PRs are the ones with apull_requestkey).summarizer.pysummarizes each item and suggests a label. It tries Groq, then Gemini (both via plainrequests, no SDK), then falls back to a keyword + truncation heuristic so it runs with zero API keys.main.pyis the CLI: fetches everything updated since the last run (tracked in.last_run.json), prints a summary + suggested label for each. Dry-run by default: pass--postto actually comment and label on GitHub (requires aGITHUB_TOKENwith write access). Posting is opt-in because it’s a visible, hard-to-reverse action on someone else’s repo.
Run it
pip install -r requirements.txt
python test_summarizer.py # smoke test, no keys needed
python main.py anthropics/claude-code --since-hours 24
# python main.py your-org/your-repo --post # actually posts (needs GITHUB_TOKEN)
Set GITHUB_TOKEN for higher rate limits / write access, and GROQ_API_KEY
or GEMINI_API_KEY for LLM-written summaries instead of the keyword fallback.
Skipped: a webhook server. Polling via --since-hours (or a cron entry)
covers “automatically fetches new issues” without standing up an HTTP
endpoint. Swap in a Flask/FastAPI webhook receiver if you need push-based,
real-time triggering instead of polling.
Support
Submit issues, questions, or bug reports to the GitHub issue tracker: https://github.com/ADM1SH/github-issue-pr-summarizer-agent/issues
Roadmap
- Done: Core architecture and baseline implementation.
- Done: Functional verification and test coverage.
- To do: Add automated label suggestion and assignment
- To do: Implement Slack and Discord webhook alert dispatches
Contributing
Contributions are welcome.
- Fork the repository.
- Create a feature branch:
git checkout -b feature/improvement. - Commit your changes:
git commit -m "feat: enhance functionality". - Push to the branch:
git push origin feature/improvement. - Open a Pull Request.
Authors and Acknowledgment
- Adam Anwar (ADM1SH) - Lead architect and developer.
- Developed by Adam Anwar. Uses the Groq and Gemini APIs.
License
Licensed under the MIT License. See LICENSE for details.
Project Status
Working CLI triage agent.