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

Feature/alert action new trigger type delaysec #30

Merged
merged 4 commits into from
Nov 14, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"