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

Adding Get Incident Alert and Manage Incident Alert endpoints #231

Merged
merged 3 commits into from
Jul 9, 2020

Conversation

stmcallister
Copy link
Contributor

Test results for all the incident tests since I also added ConferenceBridge to the Incident object.

=== RUN   TestIncident_List
--- PASS: TestIncident_List (0.00s)
=== RUN   TestIncident_Create
--- PASS: TestIncident_Create (0.00s)
=== RUN   TestIncident_Manage_status
--- PASS: TestIncident_Manage_status (0.00s)
=== RUN   TestIncident_Manage_priority
--- PASS: TestIncident_Manage_priority (0.00s)
=== RUN   TestIncident_Manage_assignments
--- PASS: TestIncident_Manage_assignments (0.00s)
=== RUN   TestIncident_Merge
--- PASS: TestIncident_Merge (0.00s)
=== RUN   TestIncident_Get
--- PASS: TestIncident_Get (0.00s)
=== RUN   TestIncident_ListIncidentNotes
--- PASS: TestIncident_ListIncidentNotes (0.00s)
=== RUN   TestIncident_ListIncidentAlerts
--- PASS: TestIncident_ListIncidentAlerts (0.00s)
=== RUN   TestIncident_ListIncidentAlertsWithOpts
--- PASS: TestIncident_ListIncidentAlertsWithOpts (0.00s)
=== RUN   TestIncident_CreateIncidentNote
--- PASS: TestIncident_CreateIncidentNote (0.00s)
=== RUN   TestIncident_CreateIncidentNoteWithResponse
--- PASS: TestIncident_CreateIncidentNoteWithResponse (0.00s)
=== RUN   TestIncident_SnoozeIncident
--- PASS: TestIncident_SnoozeIncident (0.00s)
=== RUN   TestIncident_SnoozeIncidentWithResponse
--- PASS: TestIncident_SnoozeIncidentWithResponse (0.00s)
=== RUN   TestIncident_ListLogEntries
--- PASS: TestIncident_ListLogEntries (0.00s)
=== RUN   TestIncident_ListLogEntriesSinceUntil
--- PASS: TestIncident_ListLogEntriesSinceUntil (0.00s)
=== RUN   TestIncident_ResponderRequest
--- PASS: TestIncident_ResponderRequest (0.00s)
=== RUN   TestIncident_GetAlert
--- PASS: TestIncident_GetAlert (0.00s)
=== RUN   TestIncident_ManageAlerts
--- PASS: TestIncident_ManageAlerts (0.00s)

incident.go Outdated
Acknowledgements []Acknowledgement `json:"acknowledgements,omitempty"`
LastStatusChangeAt string `json:"last_status_change_at,omitempty"`
LastStatusChangeBy APIObject `json:"last_status_change_by,omitempty"`
FirstTriggerLogEntry FirstTriggerLogEntry `json:"first_trigger_log_entry,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like we're no longer using the FirstTriggerLogEntry struct after this change -- might want to remove? It's publicly accessible but put particularly useful at this point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, we should be using that. Looks like I removed it by mistake. Will restore.

Comment on lines -396 to -408
type Alert struct {
APIObject
Service APIObject `json:"service,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
Status string `json:"status,omitempty"`
AlertKey string `json:"alert_key,omitempty"`
Incident APIObject `json:"incident,omitempty"`
}

type ListAlertResponse struct {
APIListObject
Alerts []Alert `json:"alerts,omitempty"`
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Similarly here -- guessing impact is low if these aren't referenced anymore?

@stmcallister stmcallister merged commit ab036b7 into master Jul 9, 2020
@theckman theckman deleted the incident-alerts branch May 16, 2021 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants