Skip to content

Commit

Permalink
Adds other command deep links
Browse files Browse the repository at this point in the history
  • Loading branch information
axosoft-ramint committed Oct 30, 2024
1 parent 4d65101 commit 0fac5cf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/links.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,18 @@ _{prefix}/command/{command}_

- _{command}_ is the name of the command to run. Currently supported values include:

- _cloud-patches_ - Runs the `GitLens: Show Cloud Patches View` command.

- _graph_ - Runs the `GitLens: Show Graph` command.

- _inspect_ - Runs the `GitLens: Inspect Commit Details` command.

- _launchpad_ - Runs the `GitLens: Show Launchpad` command.

- _walkthrough_ - Runs the `GitLens: Get Started` command.

- _worktrees_ - Runs the `GitLens: Show Worktrees View` command.

#### Example Usage

External sources, such as GitKraken web pages, can use these links to directly run a GitLens command - for example, to show the Launchpad.
8 changes: 8 additions & 0 deletions src/uris/deepLinks/deepLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,25 @@ export enum DeepLinkType {
}

export enum DeepLinkCommandType {
CloudPatches = 'cloud-patches',
Graph = 'graph',
Inspect = 'inspect',
Launchpad = 'launchpad',
Walkthrough = 'walkthrough',
Worktrees = 'worktrees',
}

export function isDeepLinkCommandType(type: string): type is DeepLinkCommandType {
return Object.values(DeepLinkCommandType).includes(type as DeepLinkCommandType);
}

export const DeepLinkCommandTypeToCommand = new Map<DeepLinkCommandType, Commands>([
[DeepLinkCommandType.CloudPatches, Commands.ShowDraftsView],
[DeepLinkCommandType.Graph, Commands.ShowGraph],
[DeepLinkCommandType.Inspect, Commands.ShowCommitDetailsView],
[DeepLinkCommandType.Launchpad, Commands.ShowLaunchpad],
[DeepLinkCommandType.Walkthrough, Commands.GetStarted],
[DeepLinkCommandType.Worktrees, Commands.ShowWorktreesView],
]);

export enum DeepLinkActionType {
Expand Down

0 comments on commit 0fac5cf

Please sign in to comment.