Selaa lähdekoodia

Merge branch 'nafees/pe-features' into preview-env-v2-fe

Mohammed Nafees 3 vuotta sitten
vanhempi
sitoutus
a44676db0c

+ 1 - 2
api/server/handlers/environment/create.go

@@ -74,7 +74,6 @@ func (c *CreateEnvironmentHandler) ServeHTTP(w http.ResponseWriter, r *http.Requ
 		Mode:                request.Mode,
 		WebhookID:           string(webhookUID),
 		NewCommentsDisabled: request.DisableNewComments,
-		CustomNamespace:     request.CustomNamespace,
 	}
 
 	if len(request.NamespaceAnnotations) > 0 {
@@ -191,7 +190,7 @@ func (c *CreateEnvironmentHandler) ServeHTTP(w http.ResponseWriter, r *http.Requ
 		GitInstallationID: uint(ga.InstallationID),
 		EnvironmentName:   request.Name,
 		InstanceName:      c.Config().ServerConf.InstanceName,
-		CustomNamespace:   env.CustomNamespace,
+		CustomNamespace:   request.CustomNamespace,
 	})
 
 	if err != nil {

+ 0 - 1
api/types/environment.go

@@ -16,7 +16,6 @@ type Environment struct {
 	DeploymentCount      uint              `json:"deployment_count"`
 	LastDeploymentStatus string            `json:"last_deployment_status"`
 	NewCommentsDisabled  bool              `json:"new_comments_disabled"`
-	CustomNamespace      bool              `json:"custom_namespace"`
 	NamespaceAnnotations map[string]string `json:"namespace_annotations,omitempty"`
 }
 

+ 0 - 2
internal/models/environment.go

@@ -23,7 +23,6 @@ type Environment struct {
 	Mode string
 
 	NewCommentsDisabled  bool
-	CustomNamespace      bool
 	NamespaceAnnotations []byte
 
 	// WebhookID uniquely identifies the environment when other fields (project, cluster)
@@ -61,7 +60,6 @@ func (e *Environment) ToEnvironmentType() *types.Environment {
 		GitRepoName:       e.GitRepoName,
 
 		NewCommentsDisabled:  e.NewCommentsDisabled,
-		CustomNamespace:      e.CustomNamespace,
 		NamespaceAnnotations: make(map[string]string),
 
 		Name: e.Name,