Skip to content

Commit

Permalink
Merge pull request #788 from planetscale/remove-web
Browse files Browse the repository at this point in the history
Remove --web on branch create
  • Loading branch information
mscoutermarsh authored Dec 12, 2023
2 parents 41e51f3 + 50509be commit 165c7ef
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions internal/cmd/branch/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ import (
"context"
"errors"
"fmt"
"net/url"
"time"

"github.com/pkg/browser"
"github.com/planetscale/cli/internal/cmdutil"
"github.com/planetscale/cli/internal/printer"
ps "github.com/planetscale/planetscale-go/planetscale"
Expand Down Expand Up @@ -76,23 +74,6 @@ func CreateCmd(ch *cmdutil.Helper) *cobra.Command {
createReq.Name = branch
createReq.Organization = ch.Config.Organization

web, err := cmd.Flags().GetBool("web")
if err != nil {
return err
}

if web {
ch.Printer.Println("🌐 Redirecting you to branch a database in your web browser.")
err := browser.OpenURL(fmt.Sprintf(
"%s/%s/%s/branches?name=%s&region=%s&showDialog=true",
cmdutil.ApplicationURL, ch.Config.Organization, source, url.QueryEscape(createReq.Name), url.QueryEscape(createReq.Region),
))
if err != nil {
return err
}
return nil
}

client, err := ch.Client()
if err != nil {
return err
Expand Down Expand Up @@ -165,7 +146,6 @@ func CreateCmd(ch *cmdutil.Helper) *cobra.Command {

return regionStrs, cobra.ShellCompDirectiveDefault
})
cmd.Flags().BoolP("web", "w", false, "Create a branch in your web browser")

return cmd
}
Expand Down

0 comments on commit 165c7ef

Please sign in to comment.