Skip to content
Branch: master
Commits on Aug 21, 2019
  1. Use pointer to Priority so don't send and empty priority for incident

    atomicules committed Aug 21, 2019
    Due to the changes to the Incident struct the library now inadvertently
    sends an empty priority to the API (`"priority":{}`) and for
    ManageIncidents this results in a response of:
        Priority id cannot be empty
    To prevent sending an empty priority we can use a pointer to Priority.
    Seems like a super simple fix for this - and as such I'm worried I've
    missed something else.
    Full discussion of this in this issue:
    References: #135
Commits on Mar 31, 2018
  1. Add MergeIncidents (using Incident)

    atomicules committed Mar 31, 2018
    Allows for merging of incidents as follows:
        incidents := make([]string, 3)
        incidents[0] = "PXXXXXX"
        incidents[1] = "PYYYYYY"
        incidents[2] = "PZZZZZZ"
        first := incidents[0]
        rest := incidents[1:]
        tomerge := make([]pagerduty.APIObject, 0)
        for i := range rest {
    	    inc := pagerduty.Incident{
    		APIObject: pagerduty.APIObject{
    		    ID:   rest[i],
    		    Type: "incident_reference",
    	    tomerge = append(tomerge, inc)
        result := client.MergeIncidents(email, first, tomerge)
You can’t perform that action at this time.