Browse Source

Renames *InRemote to *OnRemote for consistency

main
Eric Amodio 4 years ago
parent
commit
cbf8788905
9 changed files with 106 additions and 87 deletions
  1. +5
    -5
      README.md
  2. +64
    -64
      package.json
  3. +13
    -6
      src/commands/common.ts
  4. +2
    -2
      src/commands/openBranchOnRemote.ts
  5. +6
    -2
      src/commands/openBranchesOnRemote.ts
  6. +3
    -3
      src/commands/openCommitOnRemote.ts
  7. +2
    -2
      src/commands/openFileOnRemote.ts
  8. +9
    -1
      src/commands/openOnRemote.ts
  9. +2
    -2
      src/commands/openRepoOnRemote.ts

+ 5
- 5
README.md View File

@ -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

+ 64
- 64
package.json View File

@ -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"

+ 13
- 6
src/commands/common.ts View File

@ -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<T>(command: Commands, args: T) {

+ 2
- 2
src/commands/openBranchOnRemote.ts View File

@ -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<OpenOnRemoteCommandArgs>(Commands.OpenInRemote, {
void (await executeCommand<OpenOnRemoteCommandArgs>(Commands.OpenOnRemote, {
resource: {
type: RemoteResourceType.Branch,
branch: args.branch || 'HEAD',

+ 6
- 2
src/commands/openBranchesOnRemote.ts View File

@ -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<OpenOnRemoteCommandArgs>(Commands.OpenInRemote, {
void (await executeCommand<OpenOnRemoteCommandArgs>(Commands.OpenOnRemote, {
resource: {
type: RemoteResourceType.Branches,
},

+ 3
- 3
src/commands/openCommitOnRemote.ts View File

@ -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<OpenCommitOnRemoteCommandArgs>(Commands.OpenCommitInRemote, args);
return super.getMarkdownCommandArgsCore<OpenCommitOnRemoteCommandArgs>(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<OpenOnRemoteCommandArgs>(Commands.OpenInRemote, {
void (await executeCommand<OpenOnRemoteCommandArgs>(Commands.OpenOnRemote, {
resource: {
type: RemoteResourceType.Commit,
sha: args.sha,

+ 2
- 2
src/commands/openFileOnRemote.ts View File

@ -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<OpenOnRemoteCommandArgs>(Commands.OpenInRemote, {
void (await executeCommand<OpenOnRemoteCommandArgs>(Commands.OpenOnRemote, {
resource: {
type: sha == null ? RemoteResourceType.File : RemoteResourceType.Revision,
branch: args.branch ?? 'HEAD',

+ 9
- 1
src/commands/openOnRemote.ts View File

@ -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

+ 2
- 2
src/commands/openRepoOnRemote.ts View File

@ -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<OpenOnRemoteCommandArgs>(Commands.OpenInRemote, {
void (await executeCommand<OpenOnRemoteCommandArgs>(Commands.OpenOnRemote, {
resource: {
type: RemoteResourceType.Repo,
},

Loading…
Cancel
Save