Merge pull request #3822 from mdiniz97/feat/rocket-chat-notifications

feat: Rocket.Chat notifications
This commit is contained in:
Alexander Holliday authored and GitHub committed 2026-08-05 09:33:42 -07:00
commit 514ee0d30b
15 files changed
+379 -3

No files matched your search

+7
View File
@@ -46,6 +46,13 @@ function buildDefaults(data: Notification | null): NotificationFormData {
address: data.address || "",
};
}
if (data?.type === "rocket_chat") {
return {
type: "rocket_chat",
notificationName: data.notificationName || "",
address: data.address || "",
};
}
if (data?.type === "pager_duty") {
return {
type: "pager_duty",
+1
View File
@@ -3,6 +3,7 @@ export const NotificationChannels = [
"slack",
"discord",
"webhook",
"rocket_chat",
"pager_duty",
"matrix",
"teams",
+9
View File
@@ -30,6 +30,14 @@ const webhookSchema = baseSchema.extend({
address: z.string().min(1, "Webhook URL is required").url("Please enter a valid URL"),
});
const rocketChatSchema = baseSchema.extend({
type: z.literal("rocket_chat"),
address: z
.string()
.min(1, "Webhook URL is required")
.url({ protocol: /^https?$/, message: "Please enter a valid URL" }),
});
const pagerDutySchema = baseSchema.extend({
type: z.literal("pager_duty"),
address: z.string().min(1, "Integration key is required"),
@@ -81,6 +89,7 @@ export const notificationSchema = z.discriminatedUnion("type", [
slackSchema,
discordSchema,
webhookSchema,
rocketChatSchema,
pagerDutySchema,
matrixSchema,
teamsSchema,