Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 10, 2025

Implementation Plan for "Request review from Copilot" Feature ✅

Based on the issue screenshot and codebase analysis, I added a button in the Reviewers section to request a review from Copilot (similar to the existing "Assign Copilot" button in the Assignees section).

Implementation Checklist:

  • Understand the existing code structure
  • Add backend functionality
  • Add frontend UI components
  • Add conditional display logic
  • Compile and fix TypeScript errors
  • Address code review feedback
  • Code review and security scan
  • Add proper type for reply message (ChangeReviewersReply)

Summary

The feature is now fully implemented with proper type definitions. The button will appear in the Reviewers section of the PR sidebar when:

  1. The user has write permissions
  2. Copilot is available as a reviewer in the repository
  3. Copilot is not already a reviewer on the PR

Security Summary

✅ No security vulnerabilities detected by CodeQL analysis.

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)


✨ 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 AI and others added 3 commits December 10, 2025 16:49
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
- Added addReviewerCopilot backend handler in pullRequestOverview.ts
- Added canRequestCopilotReview property to PullRequest interface
- Added Copilot review button in Reviewers section UI
- Button shows only when Copilot is available and not already a reviewer
- Follows same pattern as existing "Assign Copilot" feature

Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
- Store assignable users in _assignableUsers member variable
- Reuse cached data in addReviewerCopilot instead of fetching again
- Improves performance by avoiding duplicate getAssignableUsers() calls

Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot AI changed the title [WIP] Add shortcut button to request review from Copilot Add "Request review from Copilot" button to Reviewers section Dec 10, 2025
Copilot AI requested a review from alexr00 December 10, 2025 17:10
await this._item.requestReview([copilotUser], []);
const newReviewers = await this._item.getReviewRequests();
this._existingReviewers = parseReviewers(newReviewers!, await this._item.getTimelineEvents(), this._item.author);
const reply = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Add a type in views.ts for the this reply.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added ChangeReviewersReply interface in views.ts and updated the method to use it. Commit: e995ca9

- Created ChangeReviewersReply interface in views.ts
- Updated addReviewerCopilot to use typed reply instead of inline object
- Fixed copilotUser reference instead of using removed COPILOT_REVIEWER_ACCOUNT
- Removed unused imports

Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot AI requested a review from alexr00 December 15, 2025 10:03
@alexr00 alexr00 marked this pull request as ready for review December 15, 2025 10:31
@alexr00 alexr00 enabled auto-merge (squash) December 15, 2025 10:31
@vs-code-engineering vs-code-engineering bot added this to the December / January 2026 milestone Dec 15, 2025
@alexr00 alexr00 merged commit 545a0ba into main Dec 15, 2025
6 checks passed
@alexr00 alexr00 deleted the copilot/add-copilot-review-button branch December 15, 2025 11:20
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.

Request review from Copilot

3 participants