Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions cmd/branches.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ var (
}
persistent bool
withData bool
notifyURL string

branchCreateCmd = &cobra.Command{
Use: "create [name]",
Expand All @@ -59,6 +60,9 @@ var (
if cmdFlags.Changed("with-data") {
body.WithData = &withData
}
if cmdFlags.Changed("notify-url") {
body.NotifyUrl = &notifyURL
}
return create.Run(cmd.Context(), body, afero.NewOsFs())
},
}
Expand Down Expand Up @@ -124,6 +128,9 @@ var (
if cmdFlags.Changed("status") {
body.Status = (*api.UpdateBranchBodyStatus)(&branchStatus.Value)
}
if cmdFlags.Changed("notify-url") {
body.NotifyUrl = &notifyURL
}
ctx := cmd.Context()
fsys := afero.NewOsFs()
if len(args) > 0 {
Expand Down Expand Up @@ -203,6 +210,7 @@ func init() {
createFlags.Var(&size, "size", "Select a desired instance size for the branch database.")
createFlags.BoolVar(&persistent, "persistent", false, "Whether to create a persistent branch.")
createFlags.BoolVar(&withData, "with-data", false, "Whether to clone production data to the branch database.")
createFlags.StringVar(&notifyURL, "notify-url", "", "URL to notify when branch is active healthy.")
branchesCmd.AddCommand(branchCreateCmd)
branchesCmd.AddCommand(branchListCmd)
branchesCmd.AddCommand(branchGetCmd)
Expand All @@ -211,6 +219,7 @@ func init() {
updateFlags.StringVar(&gitBranch, "git-branch", "", "Change the associated git branch.")
updateFlags.BoolVar(&persistent, "persistent", false, "Switch between ephemeral and persistent branch.")
updateFlags.Var(&branchStatus, "status", "Override the current branch status.")
updateFlags.StringVar(&notifyURL, "notify-url", "", "URL to notify when branch is active healthy.")
branchesCmd.AddCommand(branchUpdateCmd)
branchesCmd.AddCommand(branchDeleteCmd)
branchesCmd.AddCommand(branchDisableCmd)
Expand Down