Skip to content

Refactor: use core gh pr resolver for PR selection in helper commands #35

@rowan-stein

Description

@rowan-stein

Refactor: use core gh pr resolver for PR selection in helper commands

Goal
Make the new gh pr review helper commands use the same common PR resolver as upstream gh pr commands, ensuring identical behavior for:

  • -R OWNER/REPO
  • fully-qualified owner/repo#123
  • PR URLs
  • bare numbers inside a git checkout (local repo inference)

Scope

  • Replace custom ResolvePullRequest with calls into the core resolver used by upstream commands (via factory/cmdutil), across:
    • gh pr see-comments
    • gh pr reply-comment
    • gh pr review pending {open, add, submit}
  • Update tests and README examples accordingly.

Acceptance Criteria

  • All command entry points rely on the core resolver primitives.
  • Behavior matches upstream conventions in non-repo contexts and with overrides.
  • Unit tests added for repo-less invocation using -R, owner/repo#number, and PR URLs; bare number requires a git checkout.
  • Fork PR feat: add pr review helper commands #29 updated to include the refactor (no Nix changes).

Notes

  • Keep changes isolated from packaging branches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions