notifications-engine icon indicating copy to clipboard operation
notifications-engine copied to clipboard

feat: Rewriting PagerDuty integration to use Events API v2

Open EricTendian opened this issue 3 years ago • 1 comments
trafficstars

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>

EricTendian avatar Sep 14 '22 14:09 EricTendian

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.

codecov[bot] avatar Sep 14 '22 15:09 codecov[bot]

Hey @EricTendian , i think we need move with idea to create it as new integration and not break existing one

pasha-codefresh avatar Nov 30 '22 17:11 pasha-codefresh

@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.

EricTendian avatar Apr 12 '23 00:04 EricTendian

Thank you @EricTendian for working on this. I'm looking forward to this capability once it is released.

jjtroberts avatar May 03 '23 20:05 jjtroberts