From a0c64f7f748427a9cccc6cc5dacabcd9bfa62aec Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 15 Feb 2021 08:45:38 +0000 Subject: [PATCH 1/2] Adds the ability to define an escalation policy for the manage incidents API. --- incident.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/incident.go b/incident.go index d07332ee..d741a9d1 100644 --- a/incident.go +++ b/incident.go @@ -154,11 +154,12 @@ type CreateIncidentOptions struct { // ManageIncidentsOptions is the structure used when PUTing updates to incidents to the ManageIncidents func type ManageIncidentsOptions struct { - ID string `json:"id"` - Type string `json:"type"` - Status string `json:"status,omitempty"` - Priority *APIReference `json:"priority,omitempty"` - Assignments []Assignee `json:"assignments,omitempty"` + ID string `json:"id"` + Type string `json:"type"` + Status string `json:"status,omitempty"` + Priority *APIReference `json:"priority,omitempty"` + Assignments []Assignee `json:"assignments,omitempty"` + EscalationPolicy EscalationPolicy `json:"escalation_policy,omitempty"` } // MergeIncidentsOptions is the structure used when merging incidents with MergeIncidents func From e8ab954e9fd4de0d6a3ddb21bead8637941146d1 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 15 Feb 2021 13:18:28 +0000 Subject: [PATCH 2/2] Store ep as pointer --- incident.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/incident.go b/incident.go index d741a9d1..8b6c7cc1 100644 --- a/incident.go +++ b/incident.go @@ -154,12 +154,12 @@ type CreateIncidentOptions struct { // ManageIncidentsOptions is the structure used when PUTing updates to incidents to the ManageIncidents func type ManageIncidentsOptions struct { - ID string `json:"id"` - Type string `json:"type"` - Status string `json:"status,omitempty"` - Priority *APIReference `json:"priority,omitempty"` - Assignments []Assignee `json:"assignments,omitempty"` - EscalationPolicy EscalationPolicy `json:"escalation_policy,omitempty"` + ID string `json:"id"` + Type string `json:"type"` + Status string `json:"status,omitempty"` + Priority *APIReference `json:"priority,omitempty"` + Assignments []Assignee `json:"assignments,omitempty"` + EscalationPolicy *EscalationPolicy `json:"escalation_policy,omitempty"` } // MergeIncidentsOptions is the structure used when merging incidents with MergeIncidents func