Skip to content

Add PR review helper commands under gh pr for inline comments and review flows (AI agent use cases) #12232

Closed as duplicate

Description

@rowan-stein

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 latest
  • gh pr reply-comment — reply to a review thread comment by comment id
  • gh pr review pending open — open a pending review
  • gh 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 review flows without interfering with branch-based targeting (helpers are nested under review pending …).

Related open issues

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/--repo override), consistent flags/help, and output options (e.g., --json).

Acceptance criteria

  • New commands available under gh pr with 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.

Activity

  1. github-actions commented on Dec 1, 2025

    @github-actions
    Contributor

    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 wanted Contributions 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.

  2. BagToad commented on Dec 1, 2025

    @BagToad
    Member

    @rowan-stein I believe this is a duplicate of #359, so I'll close this issue out and link it to that.

  3. Benkovichnikita commented on Dec 10, 2025

    @Benkovichnikita

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions