Skip to content

Commit

Permalink
Merge pull request #30 from iLert/feature/alert-action-new-trigger-ty…
Browse files Browse the repository at this point in the history
…pe-delaysec

Feature/alert action new trigger type delaysec
  • Loading branch information
STLVRTX authored Nov 14, 2023
2 parents add026b + 41c178b commit 55e043e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

# 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)

# 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)
Expand Down
5 changes: 5 additions & 0 deletions alert_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type AlertAction struct {
ConnectorID string `json:"connectorId"`
ConnectorType string `json:"connectorType"`
TriggerMode string `json:"triggerMode"`
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
Expand All @@ -31,6 +32,7 @@ type AlertActionOutput struct {
ConnectorID string `json:"connectorId"`
ConnectorType string `json:"connectorType"`
TriggerMode string `json:"triggerMode"`
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
Expand Down Expand Up @@ -264,6 +266,7 @@ var AlertActionTriggerTypes = struct {
AlertAcknowledged string
AlertRaised string
AlertCommentAdded string
AlertEscalationEnded string
AlertResolved string
AlertAutoResolved string
AlertResponderAdded string
Expand All @@ -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",
Expand All @@ -293,6 +297,7 @@ var AlertActionTriggerTypesAll = []string{
AlertActionTriggerTypes.AlertAcknowledged,
AlertActionTriggerTypes.AlertRaised,
AlertActionTriggerTypes.AlertCommentAdded,
AlertActionTriggerTypes.AlertEscalationEnded,
AlertActionTriggerTypes.AlertResolved,
AlertActionTriggerTypes.AlertAutoResolved,
AlertActionTriggerTypes.AlertResponderAdded,
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ilert

// Version package version
const Version = "v3.1.0"
const Version = "v3.2.0"

0 comments on commit 55e043e

Please sign in to comment.