@@ -74,6 +74,11 @@ func (c *UpdateEnvironmentSettingsHandler) ServeHTTP(w http.ResponseWriter, r *h
changed = true
}
+ if request.Mode != env.Mode {
+ env.Mode = request.Mode
+ changed = true
+ }
+
if changed {
_, err = c.Repo().Environment().UpdateEnvironment(env)
@@ -134,6 +134,7 @@ type ToggleNewCommentRequest struct {
type ListEnvironmentsResponse []*Environment
type UpdateEnvironmentSettingsRequest struct {
+ Mode string `json:"mode" form:"oneof=auto manual"`
DisableNewComments bool `json:"disable_new_comments"`
GitRepoBranches []string `json:"git_repo_branches"`