Skip to content

Commit

Permalink
Merge pull request #542 from hashicorp/laurenolivia/cherry-pick-lawli…
Browse files Browse the repository at this point in the history
…et89

merge a contribution to update notification trigger values
  • Loading branch information
laurenolivia committed Sep 29, 2022
2 parents a0eea83 + f1a1479 commit 2e41506
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions notification_configuration.go
Expand Up @@ -45,12 +45,14 @@ type notificationConfigurations struct {
type NotificationTriggerType string

const (
NotificationTriggerCreated NotificationTriggerType = "run:created"
NotificationTriggerPlanning NotificationTriggerType = "run:planning"
NotificationTriggerNeedsAttention NotificationTriggerType = "run:needs_attention"
NotificationTriggerApplying NotificationTriggerType = "run:applying"
NotificationTriggerCompleted NotificationTriggerType = "run:completed"
NotificationTriggerErrored NotificationTriggerType = "run:errored"
NotificationTriggerCreated NotificationTriggerType = "run:created"
NotificationTriggerPlanning NotificationTriggerType = "run:planning"
NotificationTriggerNeedsAttention NotificationTriggerType = "run:needs_attention"
NotificationTriggerApplying NotificationTriggerType = "run:applying"
NotificationTriggerCompleted NotificationTriggerType = "run:completed"
NotificationTriggerErrored NotificationTriggerType = "run:errored"
NotificationTriggerAssessmentDrifted NotificationTriggerType = "assessment:drifted"
NotificationTriggerAssessmentFailed NotificationTriggerType = "assessment:failed"
)

// NotificationDestinationType represents the destination type of the
Expand Down Expand Up @@ -351,7 +353,9 @@ func validNotificationTriggerType(triggers []NotificationTriggerType) bool {
NotificationTriggerCompleted,
NotificationTriggerCreated,
NotificationTriggerErrored,
NotificationTriggerPlanning:
NotificationTriggerPlanning,
NotificationTriggerAssessmentDrifted,
NotificationTriggerAssessmentFailed:
continue
default:
return false
Expand Down

0 comments on commit 2e41506

Please sign in to comment.