Skip to content

Commit

Permalink
Merge pull request #46 from rvagg/patch-1
Browse files Browse the repository at this point in the history
feat: prefer "origin" or "upstream" remote if exists
  • Loading branch information
hogashi authored Jul 18, 2024
2 parents 7e0d977 + 21838f7 commit e5d8800
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Check warning on line 63 in src/extension.ts

View workflow job for this annotation

GitHub Actions / test

Missing semicolon
const fetchUrl = remote.fetchUrl;
const httpsUrl = normalize(fetchUrl!);

const upperPath = repository.rootUri.fsPath;
Expand Down

0 comments on commit e5d8800

Please sign in to comment.