Skip to content

Commit

Permalink
don't notify v2 users on agent incidents (#4268)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-g-town authored Feb 16, 2024
1 parent d968c18 commit 214dba7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/server/handlers/cluster/notify_new_incident.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,13 @@ func NewNotifyNewIncidentHandler(
}

func (c *NotifyNewIncidentHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
project, _ := r.Context().Value(types.ProjectScope).(*models.Project)
cluster, _ := r.Context().Value(types.ClusterScope).(*models.Cluster)

if project.GetFeatureFlag(models.ValidateApplyV2, c.Config().LaunchDarklyClient) {
return
}

request := &types.Incident{}

if ok := c.DecodeAndValidate(w, r, request); !ok {
Expand Down

0 comments on commit 214dba7

Please sign in to comment.