v0.3.30: 清理notifier参数 — 移除title/content/level/priority,标题内容由消息模板统一管理
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
import { Notifier, NotifyParams, NotifyResult, NotifierParam } from './notifier.types';
|
||||
|
||||
const params: NotifierParam[] = [
|
||||
{ key: 'webhook_url', label: 'Webhook URL', type: 'url', required: true, placeholder: 'https://open.feishu.cn/open-apis/bot/v2/hook/xxx' },
|
||||
{ key: 'title', label: '\u6807\u9898', type: 'text', default: 'CloudSearch', required: false },
|
||||
{ key: 'content', label: '\u5185\u5bb9', type: 'text', required: true },
|
||||
{ key: 'level', label: '\u7ea7\u522b', type: 'text', default: 'info', required: false },
|
||||
{ key: 'webhook_url', label: 'Webhook URL', type: 'url', required: true, placeholder: 'https://open.feishu.cn/open-apis/bot/v2/hook/xxx' }
|
||||
];
|
||||
|
||||
export const larkNotifier: Notifier = {
|
||||
@@ -24,7 +21,7 @@ export const larkNotifier: Notifier = {
|
||||
header: { title: { tag: 'plain_text', content: p.title || 'CloudSearch' }, template },
|
||||
elements: [
|
||||
{ tag: 'div', text: { tag: 'lark_md', content: p.content || '' } },
|
||||
{ tag: 'note', elements: [{ tag: 'plain_text', content: 'CloudSearch \u00b7 ' + new Date().toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' }) }] },
|
||||
{ tag: 'note', elements: [{ tag: 'plain_text', content: 'CloudSearch \u00b7 ' + new Date().toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' }) }] }
|
||||
],
|
||||
},
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user