notifications-engine
notifications-engine copied to clipboard
feat: Rewriting PagerDuty integration to use Events API v2
This PR updates the PagerDuty service to use the Events API v2 instead of the Incident Creation API. The previous API was not meant for use by automation, whereas the Events API matches existing patterns for how to trigger events/incidents in PagerDuty with an integration. I've updated docs to note the new configuration.
This is a breaking change, as the old configuration will not work with this new PagerDuty setup. If we want to preserve backwards compatibility, I suppose the existing PagerDuty service could be kept and this change could be at a service called pagerduty_v2 or something.
Fixes #89.
Signed-off-by: Eric Tendian <erictendian[at]gmail.com>
Codecov Report
Patch coverage: 72.51% and project coverage change: +0.97 :tada:
Comparison is base (
c028d2f) 52.90% compared to head (102c997) 53.88%.
:exclamation: Current head 102c997 differs from pull request most recent head 8c351f4. Consider uploading reports for the commit 8c351f4 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #105 +/- ##
==========================================
+ Coverage 52.90% 53.88% +0.97%
==========================================
Files 33 34 +1
Lines 2807 2938 +131
==========================================
+ Hits 1485 1583 +98
- Misses 1101 1128 +27
- Partials 221 227 +6
| Impacted Files | Coverage Δ | |
|---|---|---|
| pkg/services/services.go | 27.31% <33.33%> (+1.80%) |
:arrow_up: |
| pkg/services/pagerdutyv2.go | 75.40% <75.40%> (ø) |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Hey @EricTendian , i think we need move with idea to create it as new integration and not break existing one
@pasha-codefresh I finally got around to updating this, take a look and let me know if that is more what you're looking for.
Thank you @EricTendian for working on this. I'm looking forward to this capability once it is released.