Skip to content

Comments

Checkout PR at the end of a completed chat session#7641

Merged
joshspicer merged 2 commits intomainfrom
joshspicer/checkout-from-session-chat
Aug 22, 2025
Merged

Checkout PR at the end of a completed chat session#7641
joshspicer merged 2 commits intomainfrom
joshspicer/checkout-from-session-chat

Conversation

@joshspicer
Copy link
Member

@joshspicer joshspicer merged commit d72c2eb into main Aug 22, 2025
3 checks passed
@joshspicer joshspicer deleted the joshspicer/checkout-from-session-chat branch August 22, 2025 18:32
Comment on lines +665 to +666
const folderManager = reposManager.folderManagers[0];
const pullRequest = await folderManager.fetchById(folderManager.gitHubRepositories[0], Number(prNumber));
Copy link
Member

@alexr00 alexr00 Aug 25, 2025

Choose a reason for hiding this comment

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

This is not going to work for multi-repo. You can easily end up getting the wrong PR. In fully multi repo (usually multiroot workspace) setup, you could get a PR from an unrelated repo.

If there are multiple folder managers and github repos, it would be better to actually find the correct repo to fetch from. You can probably use getManagerForFile:

getManagerForFile(uri: vscode.Uri): FolderRepositoryManager | undefined {
if (uri.scheme === 'untitled') {

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.

Support checkout/apply-changes directly from the chat view

3 participants