feat: preset notify templates in workflow notification nodes

This commit is contained in:
Fu Diwei
2025-12-04 17:03:40 +08:00
parent 98bad3d3a0
commit c2427697de
12 changed files with 146 additions and 29 deletions
@@ -127,6 +127,10 @@ func (n *Notifier) Notify(ctx context.Context, subject string, message string) (
return nil, fmt.Errorf("failed to unmarshal webhook data: %w", err)
}
replaceJsonValueRecursively(webhookData, "${CERTIMATE_NOTIFIER_SUBJECT}", subject)
replaceJsonValueRecursively(webhookData, "${CERTIMATE_NOTIFIER_MESSAGE}", message)
// 兼容旧版变量
replaceJsonValueRecursively(webhookData, "${SUBJECT}", subject)
replaceJsonValueRecursively(webhookData, "${MESSAGE}", message)