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

Adds the ability to define an escalation policy for the manage incidents API #273

Closed
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
11 changes: 6 additions & 5 deletions incident.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I know this is technically an EscalationPolicy, looking at the PagerDuty API documentation it seems like this expects the APIObject subset of the EscalationPolicy type.

I'm not sure if the PagerDuty will always return success if we rendered the other EscalationPolicy fields in the JSON document. That makes me think we should update this to be an *APIObject.

What are your thoughts?

}

// MergeIncidentsOptions is the structure used when merging incidents with MergeIncidents func
Expand Down