Skip to content

Commit 2b6142d

Browse files
authored
sort so origin is first (microsoft/vscode#265367) (#7890)
1 parent aacead4 commit 2b6142d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/github/copilotRemoteAgent.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,9 @@ export class CopilotRemoteAgentManager extends Disposable {
397397
return;
398398
}
399399

400+
// Sort so that origin is first if it exists
401+
ghRemotes.sort((a, b) => (a.remoteName === 'origin' ? -1 : b.remoteName === 'origin' ? 1 : 0));
402+
400403
const result = await chooseItem<GitHubRemote>(
401404
ghRemotes,
402405
itemValue => `${itemValue.remoteName} (${itemValue.owner}/${itemValue.repositoryName})`,

0 commit comments

Comments
 (0)