-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 all event fields in the Pagerduty action plugin #64120
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,6 +64,24 @@ const ParamsSchema = schema.object( | |
component: schema.maybe(schema.string()), | ||
group: schema.maybe(schema.string()), | ||
class: schema.maybe(schema.string()), | ||
links: schema.maybe( | ||
schema.arrayOf( | ||
schema.object({ | ||
href: schema.uri(), | ||
text: schema.maybe(schema.string()), | ||
}) | ||
) | ||
), | ||
images: schema.maybe( | ||
schema.arrayOf( | ||
schema.object({ | ||
src: schema.uri(), | ||
href: schema.maybe(schema.uri()), | ||
alt: schema.maybe(schema.string()), | ||
}) | ||
) | ||
), | ||
customDetails: schema.maybe(schema.recordOf(schema.string(), schema.string())), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will need to be a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same is true for |
||
}, | ||
{ validate: validateParams } | ||
); | ||
|
@@ -234,6 +252,9 @@ function getBodyForEventAction(actionId: string, params: ActionParamsType): any | |
if (params.component != null) data.payload.component = params.component; | ||
if (params.group != null) data.payload.group = params.group; | ||
if (params.class != null) data.payload.class = params.class; | ||
if (params.customDetails != null) data.payload.custom_details = params.customDetails; | ||
if (params.links != null) data.links = params.links; | ||
if (params.images != null) data.images = params.images; | ||
|
||
return data; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're working on this but we currently have duplication between this file and
docs/user/alerting/action-types/pagerduty.asciidoc
for now. Would you be able to copy these lines to the user docs as well?I'll make sure we have an issue to cleanup the README.md file so it doesn't repeat what's in the docs.