Skip to content

Commit

Permalink
Allow to open a stack by providing an ID
Browse files Browse the repository at this point in the history
This is a feature request from a customer
  • Loading branch information
tomasmik committed Aug 11, 2023
1 parent 9b36b2b commit 1653dde
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/cmd/stack/open_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ import (
)

func openCommandInBrowser(cliCtx *cli.Context) error {
if stackID := cliCtx.String(flagStackID.Name); stackID != "" {
return browser.OpenURL(authenticated.Client.URL(
"/stack/%s",
stackID,
))
}

ignoreSubdir := cliCtx.Bool(flagIgnoreSubdir.Name)
getCurrentBranch := cliCtx.Bool(flagCurrentBranch.Name)
count := cliCtx.Int(flagSearchCount.Name)
Expand Down
1 change: 1 addition & 0 deletions internal/cmd/stack/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ func Command() *cli.Command {
Name: "open",
Usage: "Open a stack in your browser",
Flags: []cli.Flag{
flagStackID,
flagIgnoreSubdir,
flagCurrentBranch,
flagSearchCount,
Expand Down

0 comments on commit 1653dde

Please sign in to comment.