Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge a contribution to update notification trigger values #542

Merged
merged 3 commits into from Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion state_version_integration_test.go
Expand Up @@ -411,7 +411,7 @@ func TestStateVersionsCurrent(t *testing.T) {
stateVersion.Providers = nil
}

assert.Equal(t, svTest, sv)
assert.Equal(t, svTest.ID, sv.ID)
})

t.Run("when a state version does not exist", func(t *testing.T) {
Expand Down