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

Consolidated community contributions #150

Merged

Conversation

dobs
Copy link
Contributor

@dobs dobs commented May 11, 2019

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.
As the panic function will kill the program, the else statement is useless.
…gerduty into domudall-feature/struct-fix-vendor
dobs added 27 commits March 18, 2019 15:09
…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
Copy link
Contributor Author

dobs commented May 13, 2019

Will have a change up shortly to fix the command reference issues.

Also another reason it might be useful to rethink how we're building the CLI -- at the very least adding go modules support and adjusting our build steps.

@stmcallister stmcallister merged commit 702e5bc into PagerDuty:master Aug 13, 2019
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.