Browse Source

Uses default remote for deep links when configured

main
Ramin Tadayon 1 year ago
parent
commit
6d79813dde
No known key found for this signature in database GPG Key ID: 79D60DDE3DFB95F5
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/commands/copyDeepLink.ts

+ 3
- 0
src/commands/copyDeepLink.ts View File

@ -106,8 +106,11 @@ export class CopyDeepLinkCommand extends ActiveEditorCommand {
try {
let chosenRemote;
const remotes = await this.container.git.getRemotes(repoPath, { sort: true });
const defaultRemote = remotes.find(r => r.default);
if (args.remote && !args.prePickRemote) {
chosenRemote = remotes.find(r => r.name === args?.remote);
} else if (defaultRemote != null) {
chosenRemote = defaultRemote;
} else {
const pick = await showRemotePicker(
`Copy Link to ${deepLinkTypeToString(type)}`,

Loading…
Cancel
Save