feat(pagerduty): add client and client_url support for Events API v2#6241
Open
jyoti369 wants to merge 1 commit intokeephq:mainfrom
Open
feat(pagerduty): add client and client_url support for Events API v2#6241jyoti369 wants to merge 1 commit intokeephq:mainfrom
jyoti369 wants to merge 1 commit intokeephq:mainfrom
Conversation
Add optional client and client_url parameters to the PagerDuty Events API v2 payload, allowing users to configure a clickable link in PagerDuty events. Also fixes images and links placement to be top-level per API spec. Closes keephq#6233
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add optional
clientandclient_urlparameters to the PagerDuty Events API v2 integration, per the Events API v2 spec.These fields allow a clickable "View in [client]" link to appear in PagerDuty event details.
Why
The current Events API implementation is missing
clientandclient_urlattributes. Without them, events created via Keep don't show the monitoring client link in PagerDuty.Changes
clientandclient_urlas optional named parameters in_notify,_send_alert, and_build_alertpayload.payload), matching the API specimagesandlinksto also be top-level (they were incorrectly nested insidepayload.payload)client/client_urlincluded when providedclient/client_urlomitted when not providedimages/linksat correct top levelUsage in workflows
Closes #6233
Note
Medium Risk
Changes the PagerDuty Events API v2 payload structure (moving
images/linksand addingclient/client_url), which could affect how PagerDuty renders or validates events if any downstream code relied on the prior nesting.Overview
Adds optional
clientandclient_urlparameters to the PagerDuty Events API v2 alert path (_notify→_send_alert→_build_alert) and includes them in the outgoing event payload.Fixes the event payload schema by placing
imagesandlinksat the top level (instead of underpayload), and adds unit tests asserting the correct placement/omission of these fields.Reviewed by Cursor Bugbot for commit af1d6f9. Bugbot is set up for automated code reviews on this repo. Configure here.