diff --git a/src/extension.ts b/src/extension.ts index 519a624..78d2cfe 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -59,7 +59,9 @@ export function activate(context: vscode.ExtensionContext) { return; } - const fetchUrl = repository.state.remotes[0].fetchUrl; + const remote = repository.state.remotes.find((r) => ['origin', 'upstream'].includes(r.name)) || + repository.state.remotes[0] + const fetchUrl = remote.fetchUrl; const httpsUrl = normalize(fetchUrl!); const upperPath = repository.rootUri.fsPath;