Skip to content

Fix: Enable adding Copilot as a reviewer in VS Code#7807

Merged
alexr00 merged 4 commits intomainfrom
copilot/fix-47956539-792d-4ce1-816e-b568b6c22d2f
Sep 12, 2025
Merged

Fix: Enable adding Copilot as a reviewer in VS Code#7807
alexr00 merged 4 commits intomainfrom
copilot/fix-47956539-792d-4ce1-816e-b568b6c22d2f

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 12, 2025

Problem

Users can add Copilot as a PR reviewer in the GitHub web interface, but the same functionality was not available in VS Code. When trying to add reviewers through the VS Code extension, the Copilot reviewer option was missing from the quick pick list.

Root Cause

The code was correctly filtering out the Copilot coding agent (copilot-swe-agent) from the list of available reviewers since it cannot perform reviews. However, it was not replacing it with the actual Copilot reviewer (copilot-pull-request-reviewer) that users expect to see and can perform reviews.

Solution

Enhanced the reviewer selection logic in getReviewersQuickPickItems() to:

  1. Detect when the Copilot coding agent is present in the assignable users list
  2. Filter out the coding agent (preserving existing behavior)
  3. Add the Copilot reviewer (copilot-pull-request-reviewer) in its place when the coding agent was detected

Implementation Details

  • File: src/github/quickPicks.ts
  • Lines: Enhanced the reviewer filtering logic around lines 165-185
  • Approach: Minimal change that preserves all existing functionality while adding the missing Copilot reviewer option

The implementation creates a proper IAccount object for the Copilot reviewer with the correct login, name from the existing COPILOT_ACCOUNTS mapping, and proper TypeScript types.

Result

Users can now add Copilot as a reviewer through VS Code, matching the functionality available in the GitHub web interface. The change is backward compatible and only affects the specific case where the Copilot coding agent would have been filtered out.

Fixes: Need to add Copilot as a reviewer

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • update.code.visualstudio.com
    • Triggering command: node ./out/src/test/runTests.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


Additional instructions:

The Copilot coding agent and reviewer are different "users" we remove the coding agent from the reviewers quick pick. If we see that the coding agent is there, we should manually add the reviewer in it's place.

Fixes #7788


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot AI changed the title [WIP] Need to add Copilot as a reviewer Fix: Enable adding Copilot as a reviewer in VS Code Sep 12, 2025
Copilot AI requested a review from alexr00 September 12, 2025 10:37
@alexr00 alexr00 marked this pull request as ready for review September 12, 2025 11:40
@vs-code-engineering vs-code-engineering bot added this to the September 2025 milestone Sep 12, 2025
@alexr00 alexr00 merged commit 1e55634 into main Sep 12, 2025
6 checks passed
@alexr00 alexr00 deleted the copilot/fix-47956539-792d-4ce1-816e-b568b6c22d2f branch September 12, 2025 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Need to add Copilot as a reviewer

3 participants