From 3af18f4256186bc05afdea0006d2b7b92c3b09ed Mon Sep 17 00:00:00 2001 From: Rexredinger Date: Thu, 13 Oct 2022 13:06:14 -0400 Subject: [PATCH 1/2] Add support for CV failure notification type --- notification_configuration.go | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/notification_configuration.go b/notification_configuration.go index ac3811b64..afdd3cfa6 100644 --- a/notification_configuration.go +++ b/notification_configuration.go @@ -45,14 +45,15 @@ 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" - NotificationTriggerAssessmentDrifted NotificationTriggerType = "assessment:drifted" - NotificationTriggerAssessmentFailed NotificationTriggerType = "assessment:failed" + 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" + NotificationTriggerAssessmentCheckFailed NotificationTriggerType = "assessment:check_failure" ) // NotificationDestinationType represents the destination type of the @@ -355,7 +356,8 @@ func validNotificationTriggerType(triggers []NotificationTriggerType) bool { NotificationTriggerErrored, NotificationTriggerPlanning, NotificationTriggerAssessmentDrifted, - NotificationTriggerAssessmentFailed: + NotificationTriggerAssessmentFailed, + NotificationTriggerAssessmentCheckFailed: continue default: return false From 880aee69c39fb75af48e3c5f0e379f2eb4571603 Mon Sep 17 00:00:00 2001 From: Rexredinger Date: Thu, 20 Oct 2022 11:25:05 -0400 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa5747068..db2a2088f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ -# (Unreleased) +# Unreleased + +## Enhancements + +* Add `NotificationTriggerAssessmentCheckFailed` notification trigger type by @rexredinger [#549](https://github.com/hashicorp/go-tfe/pull/549) + +# v1.11.0 ## Enhancements