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

Add support for adding email filters for Generic Email Integrations #385

Merged
merged 1 commit into from
Nov 16, 2021

Conversation

theckman
Copy link
Collaborator

This change adds support for adding different email filter rules to a generic
inbound email integration associated with a specific Service. This is done by
adding two new fields to the Integration struct.

While implementing this functionality I found that the API documentation from
PagerDuty lacked details about what the correct values are for specific fields,
and specifically what each value means. In fact, I actually had to go into the
PagerDuty UI to try and set up email filters, so that I could guess what the
different API values actually meant.

Because of that, I chose to create an enum-like type for each thing that wasn't
well documented to make it easier to consume via this client. That's resulted in
quite a lot of extra code, but the result is that anyone who wishes to consume
this area of the Go SDK should be able to figure it out how to use it without
much trouble.

Because of how the code grew, I also chose to move the Service
Integration-specific code into a new file (service_integration.go).

Closes #315

This change adds support for adding different email filter rules to a generic
inbound email integration associated with a specific Service. This is done by
adding two new fields to the Integration struct.

While implementing this functionality I found that the API documentation from
PagerDuty lacked details about what the correct values are for specific fields,
and specifically what each value means. In fact, I actually had to go into the
PagerDuty UI to try and set up email filters, so that I could guess what the
different API values actually meant.

Because of that, I chose to create an enum-like type for each thing that wasn't
well documented to make it easier to consume via this client. That's resulted in
quite a lot of extra code, but the result is that anyone who wishes to consume
this area of the Go SDK should be able to figure it out how to use it without
much trouble.

Because of how the code grew, I also chose to move the Service
Integration-specific code into a new file (service_integration.go).

Closes #315
Copy link
Contributor

@stmcallister stmcallister left a comment

Choose a reason for hiding this comment

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

Breaking service_integration out to its own file makes sense. I've passed along your feedback on the API docs to our engineering team with the ask to let us know if your assumptions were incorrect. Thanks for adding this!

@theckman theckman merged commit b0b8842 into master Nov 16, 2021
@theckman theckman deleted the issue_315 branch November 16, 2021 07:20
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.

Add ability to create or update integrations with email filter rules
2 participants