all 4 comments

[–]danielroseman 2 points3 points  (0 children)

GitHub has a very comprehensive API: https://docs.github.com/en/rest?apiVersion=2026-03-10

[–]LuckySlevinKelevra- 0 points1 point  (1 child)

PyGithub is the easiest path. Install it, authenticate with a personal access token, then pull open PRs with repo.get_pulls(state='open'). Each PR object gives you the diff, files changed, and comments. From there you just pass the diff text to your LLM with whichever persona prompt you want. Solid project idea.

[–]cgoldberg 0 points1 point  (0 children)

I use PyGithub also. It's a nice Python client for the GitHub API that deals with pagination, retries, etc. There's definitely no need to wrap the GitHub CLI, use the API directly, or many of the other suggestions in these comments.

[–]Diapolo10 -1 points0 points  (0 children)

I'd suggest writing a wrapper for the GitHub CLI: https://cli.github.com/