Skip to content

Commit

Permalink
Responder type escalation in alert policies
Browse files Browse the repository at this point in the history
This commit allows to set responder type `escalation` to alert policies.

Closes: #118
  • Loading branch information
janhorstmann authored and arjunrajpal committed Jun 26, 2023
1 parent 121d2e9 commit a797126
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions policy/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,8 @@ func ValidateDelayAction(action DelayAction) error {

func ValidateResponders(responders *[]alert.Responder) error {
for _, responder := range *responders {
if responder.Type != alert.UserResponder && responder.Type != alert.TeamResponder {
return errors.New("responder type for alert policy should be one of team or user")
if responder.Type != alert.UserResponder && responder.Type != alert.TeamResponder && responder.Type != alert.EscalationResponder {
return errors.New("responder type for alert policy should be one of team, user or escalation")
}
if responder.Id == "" {
return errors.New("responder id should be provided")
Expand Down

0 comments on commit a797126

Please sign in to comment.