1. Work
  2. GitHub Issue & PR Summarizer Agent
  3. Docs

GitHub Issue & PR Summarizer Agent

CLI agent that fetches new GitHub issues and PRs, summarizes each one and suggests a label.

2 min read

Source on GitHub

Fetches new issues/PRs in a repo, generates a summary, and suggests a label.

How it works

  • github_client.py wraps the GitHub REST API (issues + PRs both come from the /issues endpoint. PRs are the ones with a pull_request key).
  • summarizer.py summarizes each item and suggests a label. It tries Groq, then Gemini (both via plain requests, no SDK), then falls back to a keyword + truncation heuristic so it runs with zero API keys.
  • main.py is 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 --post to actually comment and label on GitHub (requires a GITHUB_TOKEN with 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.

  1. Fork the repository.
  2. Create a feature branch: git checkout -b feature/improvement.
  3. Commit your changes: git commit -m "feat: enhance functionality".
  4. Push to the branch: git push origin feature/improvement.
  5. 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.

Back to top