Skip to content

Add a function to request a Copilot code review on a pull request #634

Description

Context

The GitHub PowerShell module is used to automate pull request workflows. A common pattern is a review loop: a change is opened as a draft pull request, an automated Copilot code review is requested and iterated on until it is clean, and only then is the pull request opened for human review.

Driving that loop today requires shelling out to the gh CLI (gh pr edit --add-reviewer) or calling the REST API directly. Both break the module's typed, pipeline-oriented experience and mean the review step cannot be scripted alongside the module's other pull request commands.

Request

There is no module command to request a code review from GitHub Copilot on a pull request. GitHub treats a Copilot review as a requested review — requested the same way a review is requested from a person or team — but the module exposes no first-class way to trigger it.

Desired capability

A command that requests a Copilot code review on a given pull request, so automated review loops and contributors can trigger the review as a first-class, pipeline-friendly module command — without shelling out.

Acceptance criteria

  • A Copilot code review can be requested on a pull request with a single module command.
  • The command accepts a pull request from the pipeline and resolves context the same way other module commands do.
  • Re-requesting a review after new commits is supported, so the loop can run once per iteration.
  • The outcome is reported clearly — what was requested, on which pull request.
  • Failure modes produce actionable messages — for example, when the caller lacks the required access, or when Copilot code review is not enabled for the repository.

The GitHub review process (official documentation)

Related

  • Add pull request management functions #389 (Add pull request management functions) already covers requesting and removing human and team reviewers as part of broader pull request management; this issue is specifically about requesting a Copilot code review, which that issue does not call out.

Note

Technical decisions (command name, parameters, API surface) are intentionally deferred — this issue captures the user requirement only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions