Merge pull request #26709 from drodil/notification_docs

docs(notifications): split to multiple docs and add more info
This commit is contained in:
Ben Lambert
2024-12-23 09:58:17 +01:00
committed by GitHub
8 changed files with 373 additions and 241 deletions
@@ -24,13 +24,13 @@ export const notificationsModuleEmailDecorator = createBackendModule({
},
async init({ emailTemplates }) {
emailTemplates.setTemplateRenderer({
getSubject(notification) {
async getSubject(notification) {
return `New notification from ${notification.source}`;
},
getText(notification) {
async getText(notification) {
return notification.content;
},
getHtml(notification) {
async getHtml(notification) {
return `<p>${notification.content}</p>`;
},
});
@@ -54,19 +54,50 @@ notifications:
secure: false
username: 'my-username'
password: 'my-password'
# AWS SES
# transportConfig:
# transport: 'ses'
# accessKeyId: 'my-access-key
# region: 'us-west-2'
# sendmail
# transportConfig:
# transport: 'sendmail'
# path: '/usr/sbin/sendmail'
# newline: 'unix'
# The email sender address
sender: 'sender@mycompany.com'
replyTo: 'no-reply@mycompany.com'
# Who to get email for broadcast notifications
# Who to send email for broadcast notifications
broadcastConfig:
receiver: 'users'
# How many emails to send concurrently, defaults to 2
concurrencyLimit: 10
# How much to throttle between emails, defaults to 100ms
throttleInterval:
seconds: 60
# Cache configuration for email addresses
# This is to prevent unnecessary calls to the catalog
cache:
ttl:
days: 1
# Notification filter which this processor will handle
filter:
# Minimum severity of the notification to send email
minSeverity: high
# Maximum severity of the notification to send email
maxSeverity: critical
# Topics that are excluded from sending email
excludedTopics:
- scaffolder
# List of allowed email addresses to get notifications via email
allowlistEmailAddresses:
- john.doe@backstage.io
# List of denied email addresses to get notifications via email
denylistEmailAddresses:
- jane.doe@backstage.io
```
See `config.d.ts` for more options for configuration.