Repository navigation
Add PR review helper commands under gh pr for inline comments and review flows (AI agent use cases) #12232
Copy link
Copy link
Closed as duplicate
Closed as duplicate
Copy link
Labels
enhancementa request to improve CLIa request to improve CLIneeds-triageneeds to be reviewedneeds to be reviewed
Description
Add PR review helper commands under gh pr for inline comments and review flows (AI agent use cases)
Summary
The gh CLI is increasingly used by AI agents and automation pipelines to collaborate on pull requests. These workflows benefit from first-class access to:
- reading inline review comments,
- replying to review thread comments,
- opening a pending review, adding inline comments, and submitting the review.
This issue proposes adding focused helper commands under gh pr to cover these workflows cleanly:
Proposed commands
gh pr see-comments— list inline review comments by review id or latestgh pr reply-comment— reply to a review thread comment by comment idgh pr review pending open— open a pending reviewgh pr review pending add— add inline review comment(s)gh pr review pending submit— submit the pending review
Rationale
- AI agents and bots increasingly participate in code review. Having stable, scriptable surfaces for listing, replying, and managing pending reviews reduces bespoke API calls and aligns with CLI conventions.
- These helpers complement existing
gh pr reviewflows without interfering with branch-based targeting (helpers are nested underreview pending …).
Related open issues
gh pr view --json commentsdoes not include review comments #11477 — “gh pr view --json comments does not include review comments” (addresses listing inline/review comments)- Fine Grained Code Review Support #359 — “Fine Grained Code Review Support” (umbrella request around inline/file comments and review operations)
- Output in-line comments summary in
gh pr status#9200 — “Output in-line comments summary in gh pr status” (visibility of inline comments) - Add support for --commit-id on
gh pr review#12201 — “Add support for --commit-id on gh pr review” (review tied to specific commit) gh pr [comment]not working correctly for few days #8758 — “gh pr [comment] not working correctly for few days” (reliability considerations for comment operations)- Submit a suggested change to a PR from the Github CLI #5905 — “Submit a suggested change to a PR from the Github CLI” (richer inline interactions)
- Ability to request re-review after addressing requested changes on a PR #2053 — “Ability to request re-review after addressing requested changes on a PR” (review workflow UX)
gh pr/issue commentallow editing selected comments #10865 — “gh pr/issue comment allow editing selected comments” (deterministic comment manipulation)
Implementation notes
- Reading and replying can leverage REST endpoints.
- True pending-review composition (open → add inline → submit) is best supported via GraphQL mutations.
- Commands should follow gh conventions: standard repo resolution (with
-R/--repooverride), consistent flags/help, and output options (e.g.,--json).
Acceptance criteria
- New commands available under
gh prwith docs and examples. - Unit/integration tests cover happy paths for REST list/reply and GraphQL pending open/add/submit, plus key error cases.
- No collision with existing positional usage (e.g.,
gh pr review <branch>).
Thank you for considering this proposal.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementa request to improve CLIa request to improve CLIneeds-triageneeds to be reviewedneeds to be reviewed
Activity
github-actions commentedon Dec 1, 2025
Thank you for your issue! We have categorized it as a feature request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.
Unless you see the help wantedContributions welcome
label, we are not currently looking for external contributions for this feature.
If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.
BagToad commentedon Dec 1, 2025
@rowan-stein I believe this is a duplicate of #359, so I'll close this issue out and link it to that.
Benkovichnikita commentedon Dec 10, 2025
We have implemented extension https://github.com/agynio/gh-pr-review. Feel free to use and share if you need anything!
Command to install: gh extension install Agynio/gh-pr-review
Paper: https://agyn.io/blog/gh-pr-review-cli-agent-workflows