feat: 添加发送CI监控消息的函数
All checks were successful
Egg CI/CD / build-image (push) Successful in 21s
Egg CI/CD / deploy (push) Successful in 21s

This commit is contained in:
zhaoyingbo 2024-05-17 13:29:09 +00:00
parent c2fcd6387d
commit 8b917546d7

View File

@ -62,10 +62,19 @@ const filterIllegalMsg = (body: LarkMessageEvent) => {
return false;
};
/**
* CI监控消息
* @param chatId - chatId
*/
const manageCIMsg = async (chatId: string) => {
lark.sendMsg("chat_id", chatId, "interactive", await fetchCIMonitor());
};
/**
*
* @param chatId - chatId
* @param msg -
*/
const manageReportMsg = async (chatId: string, msg: string) => {
lark.sendMsg(
"chat_id",
@ -75,6 +84,10 @@ const manageReportMsg = async (chatId: string, msg: string) => {
);
};
/**
* ID消息
* @param chatId - chatId
*/
const manageIdMsg = async (chatId: string) => {
const content = JSON.stringify({
type: "template",
@ -91,6 +104,11 @@ const manageIdMsg = async (chatId: string) => {
lark.sendMsg("chat_id", chatId, "interactive", content);
};
/**
*
* @param body -
* @returns
*/
const manageCMDMsg = (body: LarkMessageEvent) => {
const text = getMsgText(body);
const chatId = getChatId(body);