3535 }
3636 persistent bool
3737 withData bool
38+ notifyURL string
3839
3940 branchCreateCmd = & cobra.Command {
4041 Use : "create [name]" ,
5960 if cmdFlags .Changed ("with-data" ) {
6061 body .WithData = & withData
6162 }
63+ if cmdFlags .Changed ("notify-url" ) {
64+ body .NotifyUrl = & notifyURL
65+ }
6266 return create .Run (cmd .Context (), body , afero .NewOsFs ())
6367 },
6468 }
@@ -124,6 +128,9 @@ var (
124128 if cmdFlags .Changed ("status" ) {
125129 body .Status = (* api .UpdateBranchBodyStatus )(& branchStatus .Value )
126130 }
131+ if cmdFlags .Changed ("notify-url" ) {
132+ body .NotifyUrl = & notifyURL
133+ }
127134 ctx := cmd .Context ()
128135 fsys := afero .NewOsFs ()
129136 if len (args ) > 0 {
@@ -203,6 +210,7 @@ func init() {
203210 createFlags .Var (& size , "size" , "Select a desired instance size for the branch database." )
204211 createFlags .BoolVar (& persistent , "persistent" , false , "Whether to create a persistent branch." )
205212 createFlags .BoolVar (& withData , "with-data" , false , "Whether to clone production data to the branch database." )
213+ createFlags .StringVar (& notifyURL , "notify-url" , "" , "URL to notify when branch is active healthy." )
206214 branchesCmd .AddCommand (branchCreateCmd )
207215 branchesCmd .AddCommand (branchListCmd )
208216 branchesCmd .AddCommand (branchGetCmd )
@@ -211,6 +219,7 @@ func init() {
211219 updateFlags .StringVar (& gitBranch , "git-branch" , "" , "Change the associated git branch." )
212220 updateFlags .BoolVar (& persistent , "persistent" , false , "Switch between ephemeral and persistent branch." )
213221 updateFlags .Var (& branchStatus , "status" , "Override the current branch status." )
222+ updateFlags .StringVar (& notifyURL , "notify-url" , "" , "URL to notify when branch is active healthy." )
214223 branchesCmd .AddCommand (branchUpdateCmd )
215224 branchesCmd .AddCommand (branchDeleteCmd )
216225 branchesCmd .AddCommand (branchDisableCmd )
0 commit comments