Add "Request review from Copilot" button to Reviewers section
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
addReviewerCopilothandler that callsrequestReview()with Copilot user - Cached assignable users in
_assignableUsersto avoid redundant API calls - Added
canRequestCopilotReviewproperty 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
PullRequestinterface withcanRequestCopilotReview: 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.
</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.