Skip to content

Conversation

@alexr00
Copy link
Member

@alexr00 alexr00 commented Jan 12, 2026

Copilot AI review requested due to automatic review settings January 12, 2026 17:20
@alexr00 alexr00 self-assigned this Jan 12, 2026
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 12, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a "Checkout" action button to the session toolbar for cloud agent pull request sessions. The button appears only when the GitHub Pull Request extension is not activated and allows users to checkout the associated pull request by opening a URI that redirects to the GitHub PR extension.

Changes:

  • Adds a new command github.copilot.chat.checkoutPullRequestReroute that constructs a URI to trigger the GitHub PR extension's checkout flow
  • Configures the command to appear in the session toolbar for copilot-cloud-agent sessions when the PR extension is not activated
  • Adds localization string for the "Checkout" button title

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts Implements the checkoutPullRequestReroute command that parses the session URI and constructs a checkout URL for the GitHub PR extension
package.json Registers the command and adds it to the session toolbar menu with appropriate visibility conditions
package.nls.json Adds localization entry for the checkout button title
Comments suppressed due to low confidence (2)

src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts:1108

  • The variable is named pullRequestNumber but receives a string from SessionIdForCLI.parse(). This creates a type mismatch since pull request numbers should be numeric values. Additionally, the validation check on line 1109 doesn't verify that the value is actually a valid number before using it in the URI construction on line 1118.
		const pullRequestNumber = SessionIdForCLI.parse(resource);

src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts:39

  • This import should be SessionIdForPr instead of just getRepoId since the function needs to parse copilot-cloud-agent session URIs using SessionIdForPr.parsePullRequestNumber() rather than SessionIdForCLI.parse().
import { getRepoId } from '../vscode/copilotCodingAgentUtils';

connor4312
connor4312 previously approved these changes Jan 12, 2026
@alexr00 alexr00 added this pull request to the merge queue Jan 14, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 14, 2026
@alexr00 alexr00 added this pull request to the merge queue Jan 15, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 15, 2026
@alexr00 alexr00 enabled auto-merge January 15, 2026 10:19
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.

3 participants