Merge pull request #29291 from acierto/notificationsend

Made "notification:send" action idempotent
This commit is contained in:
Ben Lambert
2025-03-20 08:46:22 +01:00
committed by GitHub
2 changed files with 13 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder-backend-module-notifications': patch
---
Made "notification:send" action idempotent
@@ -133,9 +133,14 @@ export function createSendNotificationAction(options: {
};
try {
await notifications.send({
recipients: notificationRecipients,
payload,
await ctx.checkpoint({
key: `send.notification.${payload.title}`,
fn: async () => {
await notifications.send({
recipients: notificationRecipients,
payload,
});
},
});
} catch (e) {
ctx.logger.error(`Failed to send notification: ${e}`);