From 407a8517697fe4028e7d6baa8b44f3efbc76cdaf Mon Sep 17 00:00:00 2001 From: Marko Simon Date: Mon, 13 Nov 2023 15:29:09 +0100 Subject: [PATCH 1/4] add alert action new trigger type add delaySec field --- alert_action.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/alert_action.go b/alert_action.go index b66374f..9470c5a 100644 --- a/alert_action.go +++ b/alert_action.go @@ -16,6 +16,7 @@ type AlertAction struct { ConnectorID string `json:"connectorId"` ConnectorType string `json:"connectorType"` TriggerMode string `json:"triggerMode"` + DelaySec int64 `json:"delaySec,omitempty"` // between 0 and 7200, only allowed with triggerType 'alert-escalation-ended' TriggerTypes []string `json:"triggerTypes,omitempty"` CreatedAt string `json:"createdAt,omitempty"` // date time string in ISO 8601 UpdatedAt string `json:"updatedAt,omitempty"` // date time string in ISO 8601 @@ -31,6 +32,7 @@ type AlertActionOutput struct { ConnectorID string `json:"connectorId"` ConnectorType string `json:"connectorType"` TriggerMode string `json:"triggerMode"` + DelaySec int64 `json:"delaySec,omitempty"` // between 0 and 7200, only allowed with triggerType 'alert-escalation-ended' TriggerTypes []string `json:"triggerTypes,omitempty"` CreatedAt string `json:"createdAt"` // date time string in ISO 8601 UpdatedAt string `json:"updatedAt"` // date time string in ISO 8601 @@ -264,6 +266,7 @@ var AlertActionTriggerTypes = struct { AlertAcknowledged string AlertRaised string AlertCommentAdded string + AlertEscalationEnded string AlertResolved string AlertAutoResolved string AlertResponderAdded string @@ -277,6 +280,7 @@ var AlertActionTriggerTypes = struct { AlertAcknowledged: "alert-acknowledged", AlertRaised: "alert-raised", AlertCommentAdded: "alert-comment-added", + AlertEscalationEnded: "alert-escalation-ended", AlertResolved: "alert-resolved", AlertAutoResolved: "alert-auto-resolved", AlertResponderAdded: "alert-responder-added", @@ -293,6 +297,7 @@ var AlertActionTriggerTypesAll = []string{ AlertActionTriggerTypes.AlertAcknowledged, AlertActionTriggerTypes.AlertRaised, AlertActionTriggerTypes.AlertCommentAdded, + AlertActionTriggerTypes.AlertEscalationEnded, AlertActionTriggerTypes.AlertResolved, AlertActionTriggerTypes.AlertAutoResolved, AlertActionTriggerTypes.AlertResponderAdded, From 906c989bd8aabe5312790a5e878234490608d071 Mon Sep 17 00:00:00 2001 From: Marko Simon Date: Mon, 13 Nov 2023 15:31:59 +0100 Subject: [PATCH 2/4] edit changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0249ad8..d19fb13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +# 13.11.2023, Version 3.1.1 + +- add new trigger type `alert-escalation-ended` and new field `delaySec` to alert action resource in [#30](https://github.com/iLert/ilert-go/pull/30) + # 09.10.2023, Version 3.1.0 - add new fields `delayMin` and `routingKey` to escalation policy resource in [#26](https://github.com/iLert/ilert-go/pull/26) From 843657bdacb77922056785ac6fef243f3f1fc4fc Mon Sep 17 00:00:00 2001 From: Marko Simon Date: Mon, 13 Nov 2023 15:58:38 +0100 Subject: [PATCH 3/4] fix delaySec type --- alert_action.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alert_action.go b/alert_action.go index 9470c5a..f58e01b 100644 --- a/alert_action.go +++ b/alert_action.go @@ -16,7 +16,7 @@ type AlertAction struct { ConnectorID string `json:"connectorId"` ConnectorType string `json:"connectorType"` TriggerMode string `json:"triggerMode"` - DelaySec int64 `json:"delaySec,omitempty"` // between 0 and 7200, only allowed with triggerType 'alert-escalation-ended' + DelaySec int `json:"delaySec,omitempty"` // between 0 and 7200, only allowed with triggerType 'alert-escalation-ended' TriggerTypes []string `json:"triggerTypes,omitempty"` CreatedAt string `json:"createdAt,omitempty"` // date time string in ISO 8601 UpdatedAt string `json:"updatedAt,omitempty"` // date time string in ISO 8601 @@ -32,7 +32,7 @@ type AlertActionOutput struct { ConnectorID string `json:"connectorId"` ConnectorType string `json:"connectorType"` TriggerMode string `json:"triggerMode"` - DelaySec int64 `json:"delaySec,omitempty"` // between 0 and 7200, only allowed with triggerType 'alert-escalation-ended' + DelaySec int `json:"delaySec,omitempty"` // between 0 and 7200, only allowed with triggerType 'alert-escalation-ended' TriggerTypes []string `json:"triggerTypes,omitempty"` CreatedAt string `json:"createdAt"` // date time string in ISO 8601 UpdatedAt string `json:"updatedAt"` // date time string in ISO 8601 From 41c178ba3be19dca333086f84908b7fc0b68a347 Mon Sep 17 00:00:00 2001 From: Marko Simon Date: Mon, 13 Nov 2023 16:07:10 +0100 Subject: [PATCH 4/4] bump version --- CHANGELOG.md | 2 +- version.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d19fb13..bc59e0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -# 13.11.2023, Version 3.1.1 +# 13.11.2023, Version 3.2.0 - add new trigger type `alert-escalation-ended` and new field `delaySec` to alert action resource in [#30](https://github.com/iLert/ilert-go/pull/30) diff --git a/version.go b/version.go index 570fc6a..f489efb 100644 --- a/version.go +++ b/version.go @@ -1,4 +1,4 @@ package ilert // Version package version -const Version = "v3.1.0" +const Version = "v3.2.0"