Skip to content

Fix branch create help message #1046

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 30, 2025
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions internal/cmd/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ func ApiCmd(ch *cmdutil.Helper, userAgent string, defaultHeaders map[string]stri
cmd.PersistentFlags().StringVar(&ch.Config.Branch, "branch", ch.Config.Branch, "The branch this project is using")

opts := &ApiOpts{}
cmd.Flags().StringVarP(&opts.Method, "method", "X", "GET", "HTTP method to use for the request. Defaults to GET for requests without a body, or POST when a body is specified with `--field/-F` or `--input/-I`")
cmd.Flags().StringVarP(&opts.Method, "method", "X", "GET", "HTTP method to use for the request. Defaults to GET for requests without a body, or POST when a body is specified with --field/-F or --input/-I")
cmd.Flags().StringArrayVarP(&opts.Query, "query", "Q", nil, "query to append to the URL path, in `key=value` format")
cmd.Flags().StringArrayVarP(&opts.Header, "header", "H", nil, "HTTP headers to add to the request")
cmd.Flags().StringArrayVarP(&opts.Field, "field", "F", nil, "HTTP body to send with the request, in `key=value` format where `value` is a JSON entity, unless `value` starts with a `@` in which case the string after `@` represents a file that will be read. Nested types are represented as `root.depth1.depth2=value``")
cmd.Flags().StringArrayVarP(&opts.Field, "field", "F", nil, "HTTP body to send with the request, in `key=value` format where value is a JSON entity, unless value starts with a @ in which case the string after @ represents a file that will be read. Nested types are represented as 'root.depth1.depth2=value'")
cmd.Flags().StringVarP(&opts.Input, "input", "I", "", "HTTP body to send with the request, as a file that will be read and then sent.")

cmd.RunE = func(cmd *cobra.Command, args []string) error {
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/branch/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func CreateCmd(ch *cmdutil.Helper) *cobra.Command {
cmd.Flags().StringVar(&createReq.ParentBranch, "from", "", "Parent branch to create the new branch from. Cannot be used with --restore")
cmd.Flags().StringVar(&createReq.Region, "region", "", "Region for the branch to be created in.")
cmd.Flags().StringVar(&createReq.BackupID, "restore", "", "ID of Backup to restore into branch.")
cmd.Flags().StringVar(&createReq.ClusterSize, "cluster-size", "PS-10", "Cluster size for branches being created from a backup or seeded with data. Use `pscale size cluster list` to see the valid sizes.")
cmd.Flags().StringVar(&createReq.ClusterSize, "cluster-size", "PS-10", "Cluster size for branches being created from a backup or seeded with data. Use 'pscale size cluster list' to see the valid sizes.")
cmd.Flags().BoolVar(&flags.dataBranching, "seed-data", false, "Add seed data using the Data Branching™ feature. This branch will be created with the same resources as the base branch.")
cmd.Flags().BoolVar(&flags.wait, "wait", false, "Wait until the branch is ready")
cmd.MarkFlagsMutuallyExclusive("from", "restore")
Expand Down