Skip to content

Commit 3f9e36a

Browse files
authored
check all remotes for PR when adding followup (microsoft/vscode#264824) (#7758)
1 parent 5023cce commit 3f9e36a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/github/copilotRemoteAgent.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,8 @@ export class CopilotRemoteAgentManager extends Disposable {
295295
}
296296

297297
async addFollowUpToExistingPR(pullRequestNumber: number, userPrompt: string, summary?: string): Promise<string | undefined> {
298-
const repoInfo = await this.repoInfo();
299-
if (!repoInfo) {
300-
return;
301-
}
302298
try {
303-
const ghRepo = repoInfo.ghRepository;
304-
const pr = await ghRepo.getPullRequest(pullRequestNumber);
299+
const pr = await this.findPullRequestById(pullRequestNumber, true);
305300
if (!pr) {
306301
Logger.error(`Could not find pull request #${pullRequestNumber}`, CopilotRemoteAgentManager.ID);
307302
return;
@@ -1332,7 +1327,7 @@ export class CopilotRemoteAgentManager extends Disposable {
13321327
diffEntries.push({
13331328
originalUri: changeModel.parentFilePath,
13341329
modifiedUri: changeModel.filePath,
1335-
goToFileUri: changeModel.filePath
1330+
goToFileUri: changeModel.filePath,
13361331
});
13371332
}
13381333

@@ -1360,7 +1355,7 @@ export class CopilotRemoteAgentManager extends Disposable {
13601355
}
13611356
} catch (error) {
13621357
// Continue to next repository if this one doesn't have the PR
1363-
Logger.debug(`PR ${number} not found in ${githubRepo.remote.owner}/${githubRepo.remote.repositoryName}: ${error}`, CopilotRemoteAgentManager.ID);
1358+
Logger.debug(`PR ${number} not found in ${githubRepo.remote.owner}/${githubRepo.remote.repositoryName} (remote=${githubRepo.remote.url}): ${error}`, CopilotRemoteAgentManager.ID);
13641359
}
13651360
}
13661361
}

0 commit comments

Comments
 (0)