Skip to content

Commit

Permalink
Merge pull request cli#4756 from cli/no-idle-default
Browse files Browse the repository at this point in the history
Remove the default value from idle-timeout
  • Loading branch information
reybard authored Nov 19, 2021
2 parents 6f13c1e + 91dc722 commit 3aef78f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/codespaces/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ func (a *API) CreateCodespace(ctx context.Context, params *CreateCodespaceParams

type startCreateRequest struct {
RepositoryID int `json:"repository_id"`
IdleTimeoutMinutes int `json:"idle_timeout_minutes"`
IdleTimeoutMinutes int `json:"idle_timeout_minutes,omitempty"`
Ref string `json:"ref"`
Location string `json:"location"`
Machine string `json:"machine"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/codespace/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func newCreateCmd(app *App) *cobra.Command {
createCmd.Flags().StringVarP(&opts.branch, "branch", "b", "", "repository branch")
createCmd.Flags().StringVarP(&opts.machine, "machine", "m", "", "hardware specifications for the VM")
createCmd.Flags().BoolVarP(&opts.showStatus, "status", "s", false, "show status of post-create command and dotfiles")
createCmd.Flags().DurationVar(&opts.idleTimeout, "idle-timeout", 30*time.Minute, "allowed inactivity before codespace is stopped, e.g. \"10m\", \"1h\"")
createCmd.Flags().DurationVar(&opts.idleTimeout, "idle-timeout", 0, "allowed inactivity before codespace is stopped, e.g. \"10m\", \"1h\"")

return createCmd
}
Expand Down

0 comments on commit 3aef78f

Please sign in to comment.