vscode-pull-request-github icon indicating copy to clipboard operation
vscode-pull-request-github copied to clipboard

Add "Request review from Copilot" button to Reviewers section

Open Copilot opened this issue 2 months ago • 0 comments

GitHub's web interface now provides a shortcut to request reviews from Copilot. This PR adds the same capability to the VS Code extension.

Changes

Backend (src/github/pullRequestOverview.ts):

  • Added addReviewerCopilot handler that calls requestReview() with Copilot user
  • Cached assignable users in _assignableUsers to avoid redundant API calls
  • Added canRequestCopilotReview property computed from cached users and existing reviewers

Frontend (webviews/components/sidebar.tsx):

  • Added Copilot icon button in Reviewers section (mirrors Assignees pattern)
  • Button conditionally renders when canRequestCopilotReview && !isCopilotAlreadyReviewer
  • Handles ITeam vs IAccount type checking with isITeam() guard

Types (src/github/views.ts):

  • Extended PullRequest interface with canRequestCopilotReview: boolean

Button appears only when user has write permissions, Copilot is available, and not already a reviewer. Loading state prevents duplicate requests.

Original prompt

This section details on the original issue you should resolve

<issue_title>Request review from Copilot</issue_title> <issue_description>In the Github Pull request web interface, there is now a shortcut button to request a review from the Copilot bot.

Image</issue_description>

Comments on the Issue (you are @copilot in this section)

  • Fixes microsoft/vscode-pull-request-github#6830

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot avatar Dec 10 '25 16:12 Copilot