Skip to content

Commit

Permalink
Merge pull request #131 from opsgenie/api-int-update
Browse files Browse the repository at this point in the history
Added ownerTeam for updating integration owner teams
  • Loading branch information
Dekunite authored May 23, 2023
2 parents 630f160 + a7b2d75 commit d63510d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions integration/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,15 @@ func (c *Client) ForceUpdateAllFields(context context.Context, request *UpdateIn
request.OtherFields["ignoreRespondersFromPayload"] = request.IgnoreRespondersFromPayload
request.OtherFields["suppressNotifications"] = request.SuppressNotifications
request.OtherFields["responders"] = request.Responders
request.OtherFields["recipients"] = request.Responders
request.OtherFields["emailUsername"] = request.EmailUsername
request.OtherFields["url"] = request.WebhookUrl
request.OtherFields["addAlertDescription"] = request.AddAlertDescription
request.OtherFields["addAlertDetails"] = request.AddAlertDetails
request.OtherFields["headers"] = request.Headers
request.OtherFields["assignedTeam"] = request.OwnerTeam
request.OtherFields["ownerTeam"] = request.OwnerTeam

err := c.client.Exec(context, request.OtherFields, result)
if err != nil {
return nil, err
Expand Down
1 change: 1 addition & 0 deletions integration/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ type UpdateIntegrationRequest struct {
Responders []Responder
AddAlertDescription *bool
AddAlertDetails *bool
OwnerTeam *og.OwnerTeam `json:"ownerTeam,omitempty"`
Headers map[string]string
OtherFields
}
Expand Down

0 comments on commit d63510d

Please sign in to comment.