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

Spring cleaning #1

Merged
merged 67 commits into from
Mar 19, 2019
Merged

Spring cleaning #1

merged 67 commits into from
Mar 19, 2019

Conversation

dobs
Copy link
Owner

@dobs dobs commented Mar 19, 2019

This branch incorporates a bunch of old un-merged PRs from upstream, specifically:

It doesn't attempt to merge, due to potential complexity:

And skips the following as it was picked up as part of pulling in the above merged PRs:

Will have subsequent PRs for cleanup, specifically:

  • Reducing duplicate code.
  • Standardizing response and error handling.

Followed by more janitorial and refactor-oriented changes.

Dom Udall and others added 30 commits March 29, 2017 16:15
* Add explicit JSON for `ContactMethod`:
  * `ID`
  * `Label`
  * `Address`
  * `Type`
* Add field for `ContactMethod`:
  * `Summary`
* Add explicit JSON for `NotificationRule`:
  * `ID`
  * `Urgency`
  * `Type`
* Add explicit JSON for `User`:
  * `InvitationSent`
* Correct explicit JSON for `User`:
  * `timezone` to `time_zone`
* Add fields for `User`:
  * `Type`
  * `Summary`
* Add fields for `Vendor`:
  * `AlertCreationDefault`
  * `AlertCreationEditable`
  * `IsPDCEF`

No vendor endpoint in the CLI so hard to demonstrate this one in comparison to `master`. Although fields are not listed in the Response Schema in documentation, the actual endpoint does:

```
curl -X GET --header 'Accept: application/vnd.pagerduty+json;version=2' --header 'Authorization: Token token=changeme' 'https://api.pagerduty.com/vendors'
```
* Adding struct for `AlertCounts`
* Adding struct for `ResolveReason`
* Adding fields to `Incident`:
  * `Title`
  * `Description`
  * `ImpactedServices`
  * `AlertCounts`
  * `IsMergeable`
  * `Importance`
  * `ResolveReason`
Add the ability to list a user's contact methods
 - added type AlertCounts
 - added type Priority
 - added type ResolveReason
 - added type IncidentBody
 - added fields to type Incident:
   - Title
   - Priority
   - ResolveReason
   - AlertCounts
   - Body
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)
…flect use

add From header which is required for CreateMaintenanceWindow calls
add CreateMaintenanceWindowOptions struct to match general style
I believe go expects the directory layout to be $GOPATH/src

https://github.com/golang/go/wiki/GOPATH
This gives the ability for CLI users to put new events on the v2 queue
to trigger, acknowledge and resolve incidents.
…gerduty into domudall-feature/struct-fix-vendor
dobs added 27 commits March 18, 2019 14:57
…erduty into luqasn-add-details-to-oncall-json
…hnl/go-pagerduty into wdhnl-feature/fix-create-maintenance-window
This allows us to preserve compatibility for the time being, should be
unified with `CreateMaintenanceWindow` for next major revision.
…l/go-pagerduty into wdhnl-feature/fix-create-incident-options
@dobs dobs merged commit 7aa5782 into master Mar 19, 2019
@dobs dobs deleted the spring-cleaning branch March 19, 2019 18:39
dobs pushed a commit that referenced this pull request Jan 5, 2022
* Adding "suspend" action to rule actions

* Adding Service Event Rules support
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.