From cbf8788905fe4424405d0c85b0b3c1931c5b93b6 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Fri, 30 Oct 2020 03:10:24 -0400 Subject: [PATCH] Renames *InRemote to *OnRemote for consistency --- README.md | 10 +-- package.json | 128 +++++++++++++++++------------------ src/commands/common.ts | 19 ++++-- src/commands/openBranchOnRemote.ts | 4 +- src/commands/openBranchesOnRemote.ts | 8 ++- src/commands/openCommitOnRemote.ts | 6 +- src/commands/openFileOnRemote.ts | 4 +- src/commands/openOnRemote.ts | 10 ++- src/commands/openRepoOnRemote.ts | 4 +- 9 files changed, 106 insertions(+), 87 deletions(-) diff --git a/README.md b/README.md index 3cd7ba6..c823391 100644 --- a/README.md +++ b/README.md @@ -553,11 +553,11 @@ The repositories view provides the following features, - Adds commands to Open files, commits, branches, and the repository on the supported remote services, **Bitbucket, GitHub, GitLab, and Azure DevOps** or a [**user-defined** remote services](#custom-remotes-settings 'Jump to Custom Remotes settings') — only available if a Git upstream service is configured in the repository - Also supports [remote services with custom domains](#custom-remotes-settings 'Jump to Custom Remotes settings'), such as **Bitbucket, Bitbucket Server (previously called Stash), GitHub, GitHub Enterprise, GitLab** - - _Open Branches on Remote_ command (`gitlens.openBranchesInRemote`) — opens the branches on the supported remote service - - _Open Branch on Remote_ command (`gitlens.openBranchInRemote`) — opens the current branch commits on the supported remote service - - _Open Commit on Remote_ command (`gitlens.openCommitInRemote`) — opens the commit revision of the current line on the supported remote service - - _Open File on Remote_ command (`gitlens.openFileInRemote`) — opens the current file/revision on the supported remote service - - _Open Repository on Remote_ command (`gitlens.openRepoInRemote`) — opens the repository on the supported remote service + - _Open Branches on Remote_ command (`gitlens.openBranchesOnRemote`) — opens the branches on the supported remote service + - _Open Branch on Remote_ command (`gitlens.openBranchOnRemote`) — opens the current branch commits on the supported remote service + - _Open Commit on Remote_ command (`gitlens.openCommitOnRemote`) — opens the commit revision of the current line on the supported remote service + - _Open File on Remote_ command (`gitlens.openFileOnRemote`) — opens the current file/revision on the supported remote service + - _Open Repository on Remote_ command (`gitlens.openRepoOnRemote`) — opens the repository on the supported remote service ### Branch History diff --git a/package.json b/package.json index aa14389..c9691de 100644 --- a/package.json +++ b/package.json @@ -139,23 +139,23 @@ "onCommand:gitlens.connectRemoteProvider", "onCommand:gitlens.disconnectRemoteProvider", "onCommand:gitlens.copyMessageToClipboard", - "onCommand:gitlens.copyRemoteCommitUrl", - "onCommand:gitlens.copyRemoteFileUrlToClipboard", "onCommand:gitlens.copyShaToClipboard", "onCommand:gitlens.closeUnchangedFiles", "onCommand:gitlens.openChangedFiles", - "onCommand:gitlens.openBranchesInRemote", + "onCommand:gitlens.openBranchesOnRemote", "onCommand:gitlens.copyRemoteBranchesUrl", - "onCommand:gitlens.openBranchInRemote", + "onCommand:gitlens.openBranchOnRemote", "onCommand:gitlens.copyRemoteBranchUrl", - "onCommand:gitlens.openCommitInRemote", + "onCommand:gitlens.openCommitOnRemote", + "onCommand:gitlens.copyRemoteCommitUrl", "onCommand:gitlens.openFileFromRemote", - "onCommand:gitlens.openFileInRemote", + "onCommand:gitlens.openFileOnRemote", + "onCommand:gitlens.copyRemoteFileUrlToClipboard", "onCommand:gitlens.openFileRevision", "onCommand:gitlens.openFileRevisionFrom", "onCommand:gitlens.openPullRequestOnRemote", "onCommand:gitlens.openAssociatedPullRequestOnRemote", - "onCommand:gitlens.openRepoInRemote", + "onCommand:gitlens.openRepoOnRemote", "onCommand:gitlens.copyRemoteRepositoryUrl", "onCommand:gitlens.openRevisionFile", "onCommand:gitlens.openRevisionFileInDiffLeft", @@ -3034,24 +3034,6 @@ } }, { - "command": "gitlens.copyRemoteCommitUrl", - "title": "Copy Remote Commit Url", - "category": "GitLens", - "icon": { - "dark": "images/dark/icon-copy-link.svg", - "light": "images/light/icon-copy-link.svg" - } - }, - { - "command": "gitlens.copyRemoteFileUrlToClipboard", - "title": "Copy Remote File Url", - "category": "GitLens", - "icon": { - "dark": "images/dark/icon-copy-link.svg", - "light": "images/light/icon-copy-link.svg" - } - }, - { "command": "gitlens.copyShaToClipboard", "title": "Copy SHA", "category": "GitLens", @@ -3071,7 +3053,7 @@ "category": "GitLens" }, { - "command": "gitlens.openBranchesInRemote", + "command": "gitlens.openBranchesOnRemote", "title": "Open Branches on Remote", "category": "GitLens", "icon": "$(globe)" @@ -3086,7 +3068,7 @@ } }, { - "command": "gitlens.openBranchInRemote", + "command": "gitlens.openBranchOnRemote", "title": "Open Branch on Remote", "category": "GitLens", "icon": "$(globe)" @@ -3101,23 +3083,41 @@ } }, { - "command": "gitlens.openCommitInRemote", + "command": "gitlens.openCommitOnRemote", "title": "Open Commit on Remote", "category": "GitLens", "icon": "$(globe)" }, { + "command": "gitlens.copyRemoteCommitUrl", + "title": "Copy Remote Commit Url", + "category": "GitLens", + "icon": { + "dark": "images/dark/icon-copy-link.svg", + "light": "images/light/icon-copy-link.svg" + } + }, + { "command": "gitlens.openFileFromRemote", "title": "Open File from Remote", "category": "GitLens" }, { - "command": "gitlens.openFileInRemote", + "command": "gitlens.openFileOnRemote", "title": "Open File on Remote", "category": "GitLens", "icon": "$(globe)" }, { + "command": "gitlens.copyRemoteFileUrlToClipboard", + "title": "Copy Remote File Url", + "category": "GitLens", + "icon": { + "dark": "images/dark/icon-copy-link.svg", + "light": "images/light/icon-copy-link.svg" + } + }, + { "command": "gitlens.openFileRevision", "title": "Open File at Revision...", "icon": { @@ -3148,7 +3148,7 @@ "icon": "$(git-pull-request)" }, { - "command": "gitlens.openRepoInRemote", + "command": "gitlens.openRepoOnRemote", "title": "Open Repository on Remote", "category": "GitLens", "icon": "$(globe)" @@ -4672,14 +4672,6 @@ "when": "gitlens:activeFileStatus =~ /blameable/" }, { - "command": "gitlens.copyRemoteCommitUrl", - "when": "gitlens:activeFileStatus =~ /tracked/ && gitlens:activeFileStatus =~ /remotes/" - }, - { - "command": "gitlens.copyRemoteFileUrlToClipboard", - "when": "gitlens:activeFileStatus =~ /tracked/ && gitlens:activeFileStatus =~ /remotes/" - }, - { "command": "gitlens.copyShaToClipboard", "when": "gitlens:activeFileStatus =~ /blameable/" }, @@ -4692,7 +4684,7 @@ "when": "gitlens:enabled" }, { - "command": "gitlens.openBranchesInRemote", + "command": "gitlens.openBranchesOnRemote", "when": "gitlens:hasRemotes" }, { @@ -4700,7 +4692,7 @@ "when": "false" }, { - "command": "gitlens.openBranchInRemote", + "command": "gitlens.openBranchOnRemote", "when": "gitlens:hasRemotes" }, { @@ -4708,10 +4700,14 @@ "when": "false" }, { - "command": "gitlens.openCommitInRemote", + "command": "gitlens.openCommitOnRemote", "when": "gitlens:activeFileStatus =~ /blameable/ && gitlens:activeFileStatus =~ /remotes/" }, { + "command": "gitlens.copyRemoteCommitUrl", + "when": "gitlens:activeFileStatus =~ /tracked/ && gitlens:activeFileStatus =~ /remotes/" + }, + { "command": "gitlens.openPullRequestOnRemote", "when": "false" }, @@ -4720,7 +4716,11 @@ "when": "gitlens:activeFileStatus =~ /blameable/ && gitlens:activeFileStatus =~ /remotes/" }, { - "command": "gitlens.openFileInRemote", + "command": "gitlens.openFileOnRemote", + "when": "gitlens:activeFileStatus =~ /tracked/ && gitlens:activeFileStatus =~ /remotes/" + }, + { + "command": "gitlens.copyRemoteFileUrlToClipboard", "when": "gitlens:activeFileStatus =~ /tracked/ && gitlens:activeFileStatus =~ /remotes/" }, { @@ -4732,7 +4732,7 @@ "when": "gitlens:activeFileStatus =~ /tracked/" }, { - "command": "gitlens.openRepoInRemote", + "command": "gitlens.openRepoOnRemote", "when": "gitlens:hasRemotes" }, { @@ -5531,13 +5531,13 @@ "group": "2_gitlens@1" }, { - "command": "gitlens.openCommitInRemote", + "command": "gitlens.openCommitOnRemote", "when": "editorTextFocus && gitlens:activeFileStatus =~ /remotes/ && config.gitlens.menus.editor.remote", "group": "2_gitlens@2", "alt": "gitlens.copyRemoteCommitUrl" }, { - "command": "gitlens.openFileInRemote", + "command": "gitlens.openFileOnRemote", "when": "editorTextFocus && gitlens:activeFileStatus =~ /remotes/ && config.gitlens.menus.editor.remote", "group": "2_gitlens@3", "alt": "gitlens.copyRemoteFileUrlToClipboard" @@ -5685,7 +5685,7 @@ "group": "2_gitlens@1" }, { - "command": "gitlens.openFileInRemote", + "command": "gitlens.openFileOnRemote", "when": "gitlens:enabled && gitlens:hasRemotes && config.gitlens.menus.editorTab.remote", "group": "2_gitlens@2", "alt": "gitlens.copyRemoteFileUrlToClipboard" @@ -5703,7 +5703,7 @@ "group": "4_gitlens@0" }, { - "command": "gitlens.openFileInRemote", + "command": "gitlens.openFileOnRemote", "when": "!explorerResourceIsRoot && !explorerResourceIsFolder && gitlens:enabled && gitlens:hasRemotes && config.gitlens.menus.explorer.remote", "group": "4_gitlens@1", "alt": "gitlens.copyRemoteFileUrlToClipboard" @@ -5772,7 +5772,7 @@ "group": "navigation" }, { - "command": "gitlens.openFileInRemote", + "command": "gitlens.openFileOnRemote", "when": "gitlens:enabled && gitlens:hasRemotes && scmProvider == git && scmResourceGroup =~ /^(workingTree|index|merge)$/ && config.gitlens.menus.scmItem.remote", "group": "navigation@98", "alt": "gitlens.copyRemoteFileUrlToClipboard" @@ -5795,7 +5795,7 @@ ], "timeline/item/context": [ { - "command": "gitlens.openCommitInRemote", + "command": "gitlens.openCommitOnRemote", "when": "gitlens:enabled && gitlens:hasRemotes && timelineItem =~ /git:file:commit\\b/", "group": "inline@99", "alt": "gitlens.copyRemoteCommitUrl" @@ -6405,13 +6405,13 @@ "group": "inline@1" }, { - "command": "gitlens.openBranchesInRemote", + "command": "gitlens.openBranchesOnRemote", "when": "viewItem =~ /gitlens:branches\\b(?=.*?\\b\\+remotes\\b)/", "group": "inline@98", "alt": "gitlens.copyRemoteBranchesUrl" }, { - "command": "gitlens.openBranchesInRemote", + "command": "gitlens.openBranchesOnRemote", "when": "viewItem =~ /gitlens:branches\\b(?=.*?\\b\\+remotes\\b)/", "group": "1_gitlens@1", "alt": "gitlens.copyRemoteBranchesUrl" @@ -6468,7 +6468,7 @@ "group": "inline@98" }, { - "command": "gitlens.openBranchInRemote", + "command": "gitlens.openBranchOnRemote", "when": "viewItem =~ /gitlens:branch\\b(?=.*?\\b\\+(tracking|remote)\\b)/", "group": "inline@99", "alt": "gitlens.copyRemoteBranchUrl" @@ -6519,7 +6519,7 @@ "group": "1_gitlens_actions@8" }, { - "command": "gitlens.openBranchInRemote", + "command": "gitlens.openBranchOnRemote", "when": "viewItem =~ /gitlens:branch\\b(?=.*?\\b\\+(tracking|remote)\\b)/", "group": "2_gitlens_quickopen@1", "alt": "gitlens.copyRemoteBranchUrl" @@ -6621,7 +6621,7 @@ "alt": "gitlens.copyMessageToClipboard" }, { - "command": "gitlens.openCommitInRemote", + "command": "gitlens.openCommitOnRemote", "when": "viewItem =~ /gitlens:commit\\b/ && gitlens:hasRemotes", "group": "inline@99", "alt": "gitlens.copyRemoteCommitUrl" @@ -6682,7 +6682,7 @@ "group": "2_gitlens_quickopen@1" }, { - "command": "gitlens.openCommitInRemote", + "command": "gitlens.openCommitOnRemote", "when": "viewItem =~ /gitlens:commit\\b/ && gitlens:hasRemotes", "group": "3_gitlens_explore@0", "alt": "gitlens.copyRemoteCommitUrl" @@ -6746,7 +6746,7 @@ "alt": "gitlens.copyMessageToClipboard" }, { - "command": "gitlens.openFileInRemote", + "command": "gitlens.openFileOnRemote", "when": "viewItem =~ /gitlens:(file\\b(?!.*?\\b\\+(un)?staged\\b)|history:(file|line))\\b/ && gitlens:hasRemotes", "group": "inline@99", "alt": "gitlens.copyRemoteFileUrlToClipboard" @@ -6787,7 +6787,7 @@ "group": "2_gitlens_quickopen@4" }, { - "command": "gitlens.openFileInRemote", + "command": "gitlens.openFileOnRemote", "when": "viewItem =~ /gitlens:file\\b/ && gitlens:hasRemotes", "group": "2_gitlens_quickopen@5", "alt": "gitlens.copyRemoteFileUrlToClipboard" @@ -6798,7 +6798,7 @@ "group": "2_gitlens_quickopen@6" }, { - "command": "gitlens.openCommitInRemote", + "command": "gitlens.openCommitOnRemote", "when": "viewItem =~ /gitlens:file\\b(?=.*?\\b\\+committed\\b)/ && gitlens:hasRemotes", "group": "3_gitlens_explore@0", "alt": "gitlens.copyRemoteCommitUrl" @@ -6824,7 +6824,7 @@ "group": "8_gitlens_actions@2" }, { - "command": "gitlens.openFileInRemote", + "command": "gitlens.openFileOnRemote", "when": "viewItem =~ /gitlens:(history:(file|line)|status:file)\\b/ && gitlens:hasRemotes", "group": "5_gitlens_open@2", "alt": "gitlens.copyRemoteFileUrlToClipboard" @@ -6870,7 +6870,7 @@ "group": "inline@98" }, { - "command": "gitlens.openRepoInRemote", + "command": "gitlens.openRepoOnRemote", "when": "viewItem =~ /gitlens:remote\\b/", "group": "inline@99", "alt": "gitlens.copyRemoteRepositoryUrl" @@ -6886,13 +6886,13 @@ "group": "1_gitlens_actions@2" }, { - "command": "gitlens.openRepoInRemote", + "command": "gitlens.openRepoOnRemote", "when": "viewItem =~ /gitlens:remote\\b/", "group": "5_gitlens_open@1", "alt": "gitlens.copyRemoteRepositoryUrl" }, { - "command": "gitlens.openBranchesInRemote", + "command": "gitlens.openBranchesOnRemote", "when": "viewItem =~ /gitlens:remote\\b/", "group": "5_gitlens_open@2", "alt": "gitlens.copyRemoteBranchesUrl" @@ -6984,7 +6984,7 @@ "group": "2_gitlens_quickopen@1" }, { - "command": "gitlens.openRepoInRemote", + "command": "gitlens.openRepoOnRemote", "when": "viewItem =~ /gitlens:repository\\b/ && gitlens:hasRemotes", "group": "2_gitlens_quickopen@2", "alt": "gitlens.copyRemoteRepositoryUrl" @@ -7041,7 +7041,7 @@ "group": "inline@2" }, { - "command": "gitlens.openBranchInRemote", + "command": "gitlens.openBranchOnRemote", "when": "gitlens:hasRemotes && !gitlens:readonly && viewItem =~ /gitlens:status:upstream:(?!none)/", "group": "inline@99", "alt": "gitlens.copyRemoteBranchUrl" diff --git a/src/commands/common.ts b/src/commands/common.ts index 92ed50f..835ba03 100644 --- a/src/commands/common.ts +++ b/src/commands/common.ts @@ -65,17 +65,17 @@ export enum Commands { FetchRepositories = 'gitlens.fetchRepositories', InviteToLiveShare = 'gitlens.inviteToLiveShare', OpenChangedFiles = 'gitlens.openChangedFiles', - OpenBranchesInRemote = 'gitlens.openBranchesInRemote', - OpenBranchInRemote = 'gitlens.openBranchInRemote', - OpenCommitInRemote = 'gitlens.openCommitInRemote', + OpenBranchesOnRemote = 'gitlens.openBranchesOnRemote', + OpenBranchOnRemote = 'gitlens.openBranchOnRemote', + OpenCommitOnRemote = 'gitlens.openCommitOnRemote', OpenFileFromRemote = 'gitlens.openFileFromRemote', - OpenFileInRemote = 'gitlens.openFileInRemote', + OpenFileOnRemote = 'gitlens.openFileOnRemote', OpenFileAtRevision = 'gitlens.openFileRevision', OpenFileAtRevisionFrom = 'gitlens.openFileRevisionFrom', - OpenInRemote = 'gitlens.openInRemote', + OpenOnRemote = 'gitlens.openOnRemote', OpenPullRequestOnRemote = 'gitlens.openPullRequestOnRemote', OpenAssociatedPullRequestOnRemote = 'gitlens.openAssociatedPullRequestOnRemote', - OpenRepoInRemote = 'gitlens.openRepoInRemote', + OpenRepoOnRemote = 'gitlens.openRepoOnRemote', OpenRevisionFile = 'gitlens.openRevisionFile', OpenRevisionFileInDiffLeft = 'gitlens.openRevisionFileInDiffLeft', OpenRevisionFileInDiffRight = 'gitlens.openRevisionFileInDiffRight', @@ -147,6 +147,13 @@ export enum Commands { ToggleZenMode = 'gitlens.toggleZenMode', ViewsOpenDirectoryDiff = 'gitlens.views.openDirectoryDiff', ViewsOpenDirectoryDiffWithWorking = 'gitlens.views.openDirectoryDiffWithWorking', + + Deprecated_OpenBranchesInRemote = 'gitlens.openBranchesInRemote', + Deprecated_OpenBranchInRemote = 'gitlens.openBranchInRemote', + Deprecated_OpenCommitInRemote = 'gitlens.openCommitInRemote', + Deprecated_OpenFileInRemote = 'gitlens.openFileInRemote', + Deprecated_OpenInRemote = 'gitlens.openInRemote', + Deprecated_OpenRepoInRemote = 'gitlens.openRepoInRemote', } export function executeCommand(command: Commands, args: T) { diff --git a/src/commands/openBranchOnRemote.ts b/src/commands/openBranchOnRemote.ts index 71c9ab5..d45a7e9 100644 --- a/src/commands/openBranchOnRemote.ts +++ b/src/commands/openBranchOnRemote.ts @@ -26,7 +26,7 @@ export interface OpenBranchOnRemoteCommandArgs { @command() export class OpenBranchOnRemoteCommand extends ActiveEditorCommand { constructor() { - super([Commands.OpenBranchInRemote, Commands.CopyRemoteBranchUrl]); + super([Commands.OpenBranchOnRemote, Commands.Deprecated_OpenBranchInRemote, Commands.CopyRemoteBranchUrl]); } protected preExecute(context: CommandContext, args?: OpenBranchOnRemoteCommandArgs) { @@ -80,7 +80,7 @@ export class OpenBranchOnRemoteCommand extends ActiveEditorCommand { args.branch = pick.ref; } - void (await executeCommand(Commands.OpenInRemote, { + void (await executeCommand(Commands.OpenOnRemote, { resource: { type: RemoteResourceType.Branch, branch: args.branch || 'HEAD', diff --git a/src/commands/openBranchesOnRemote.ts b/src/commands/openBranchesOnRemote.ts index 32153c5..b14a7cd 100644 --- a/src/commands/openBranchesOnRemote.ts +++ b/src/commands/openBranchesOnRemote.ts @@ -23,7 +23,11 @@ export interface OpenBranchesOnRemoteCommandArgs { @command() export class OpenBranchesOnRemoteCommand extends ActiveEditorCommand { constructor() { - super([Commands.OpenBranchesInRemote, Commands.CopyRemoteBranchesUrl]); + super([ + Commands.OpenBranchesOnRemote, + Commands.Deprecated_OpenBranchesInRemote, + Commands.CopyRemoteBranchesUrl, + ]); } protected preExecute(context: CommandContext, args?: OpenBranchesOnRemoteCommandArgs) { @@ -51,7 +55,7 @@ export class OpenBranchesOnRemoteCommand extends ActiveEditorCommand { if (!repoPath) return; try { - void (await executeCommand(Commands.OpenInRemote, { + void (await executeCommand(Commands.OpenOnRemote, { resource: { type: RemoteResourceType.Branches, }, diff --git a/src/commands/openCommitOnRemote.ts b/src/commands/openCommitOnRemote.ts index b9f47c0..888bd65 100644 --- a/src/commands/openCommitOnRemote.ts +++ b/src/commands/openCommitOnRemote.ts @@ -28,11 +28,11 @@ export class OpenCommitOnRemoteCommand extends ActiveEditorCommand { static getMarkdownCommandArgs(args: OpenCommitOnRemoteCommandArgs): string; static getMarkdownCommandArgs(argsOrSha: OpenCommitOnRemoteCommandArgs | string): string { const args: OpenCommitOnRemoteCommandArgs = typeof argsOrSha === 'string' ? { sha: argsOrSha } : argsOrSha; - return super.getMarkdownCommandArgsCore(Commands.OpenCommitInRemote, args); + return super.getMarkdownCommandArgsCore(Commands.OpenCommitOnRemote, args); } constructor() { - super([Commands.OpenCommitInRemote, Commands.CopyRemoteCommitUrl]); + super([Commands.OpenCommitOnRemote, Commands.Deprecated_OpenCommitInRemote, Commands.CopyRemoteCommitUrl]); } protected preExecute(context: CommandContext, args?: OpenCommitOnRemoteCommandArgs) { @@ -96,7 +96,7 @@ export class OpenCommitOnRemoteCommand extends ActiveEditorCommand { args.sha = commit.sha; } - void (await executeCommand(Commands.OpenInRemote, { + void (await executeCommand(Commands.OpenOnRemote, { resource: { type: RemoteResourceType.Commit, sha: args.sha, diff --git a/src/commands/openFileOnRemote.ts b/src/commands/openFileOnRemote.ts index d5db7ae..b6ca5f3 100644 --- a/src/commands/openFileOnRemote.ts +++ b/src/commands/openFileOnRemote.ts @@ -32,7 +32,7 @@ export interface OpenFileOnRemoteCommandArgs { @command() export class OpenFileOnRemoteCommand extends ActiveEditorCommand { constructor() { - super([Commands.OpenFileInRemote, Commands.CopyRemoteFileUrl]); + super([Commands.OpenFileOnRemote, Commands.Deprecated_OpenFileInRemote, Commands.CopyRemoteFileUrl]); } protected async preExecute(context: CommandContext, args?: OpenFileOnRemoteCommandArgs) { @@ -140,7 +140,7 @@ export class OpenFileOnRemoteCommand extends ActiveEditorCommand { } } - void (await executeCommand(Commands.OpenInRemote, { + void (await executeCommand(Commands.OpenOnRemote, { resource: { type: sha == null ? RemoteResourceType.File : RemoteResourceType.Revision, branch: args.branch ?? 'HEAD', diff --git a/src/commands/openOnRemote.ts b/src/commands/openOnRemote.ts index 4343779..8073d35 100644 --- a/src/commands/openOnRemote.ts +++ b/src/commands/openOnRemote.ts @@ -31,7 +31,7 @@ export type OpenOnRemoteCommandArgs = @command() export class OpenOnRemoteCommand extends Command { constructor() { - super(Commands.OpenInRemote); + super([Commands.OpenOnRemote, Commands.Deprecated_OpenInRemote]); } async execute(args?: OpenOnRemoteCommandArgs) { @@ -102,6 +102,14 @@ export class OpenOnRemoteCommand extends Command { )}${GitRevision.shorten(args.resource.sha)}`; break; + case RemoteResourceType.Comparison: + title = `${args.clipboard ? 'Copy Comparison Url' : 'Open Comparison'}${Strings.pad( + GlyphChars.Dot, + 2, + 2, + )}${GitRevision.createRange(args.resource.ref1, args.resource.ref2, '...')}`; + break; + case RemoteResourceType.File: title = `${args.clipboard ? 'Copy File Url' : 'Open File'}${Strings.pad(GlyphChars.Dot, 2, 2)}${ args.resource.fileName diff --git a/src/commands/openRepoOnRemote.ts b/src/commands/openRepoOnRemote.ts index c517d55..b90b418 100644 --- a/src/commands/openRepoOnRemote.ts +++ b/src/commands/openRepoOnRemote.ts @@ -23,7 +23,7 @@ export interface OpenRepoOnRemoteCommandArgs { @command() export class OpenRepoOnRemoteCommand extends ActiveEditorCommand { constructor() { - super([Commands.OpenRepoInRemote, Commands.CopyRemoteRepositoryUrl]); + super([Commands.OpenRepoOnRemote, Commands.Deprecated_OpenRepoInRemote, Commands.CopyRemoteRepositoryUrl]); } protected preExecute(context: CommandContext, args?: OpenRepoOnRemoteCommandArgs) { @@ -53,7 +53,7 @@ export class OpenRepoOnRemoteCommand extends ActiveEditorCommand { if (!repoPath) return; try { - void (await executeCommand(Commands.OpenInRemote, { + void (await executeCommand(Commands.OpenOnRemote, { resource: { type: RemoteResourceType.Repo, },