mirror of
https://github.com/certimate-go/certimate.git
synced 2026-10-29 17:58:19 +08:00
feat: preset notify templates in workflow notification nodes
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user