feat: 添加简报收集器功能
All checks were successful
Egg CI/CD / build-image (push) Successful in 21s
Egg CI/CD / deploy (push) Successful in 56s

This commit is contained in:
zhaoyingbo 2024-05-17 13:09:50 +00:00
parent 00b6fc6984
commit a0a80bbee8
3 changed files with 3 additions and 5 deletions

View File

@ -10,7 +10,8 @@
"files.autoSave": "afterDelay",
"editor.guides.bracketPairs": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
"editor.formatOnSave": true,
"github.copilot.chat.localeOverride": "zh-CN"
},
"extensions": [
"dbaeumer.vscode-eslint",

View File

@ -64,7 +64,6 @@ const filterIllegalMsg = (body: LarkMessageEvent) => {
const manageCMDMsg = async (body: LarkMessageEvent) => {
const text = getMsgText(body);
console.log("🚀 ~ manageCMDMsg ~ text:", text);
const chatId = getChatId(body);
let msgContent = "";
if (text === "/id") {
@ -84,8 +83,6 @@ const manageCMDMsg = async (body: LarkMessageEvent) => {
if (text === "/ci") {
msgContent = await fetchCIMonitor();
}
console.log("🚀 ~ manageCMDMsg ~ 简报:", text.includes("简报"));
console.log("🚀 ~ manageCMDMsg ~ share:", text.includes("share"));
if (text.includes("share") && text.includes("简报")) {
msgContent = await fetchReportCollector(text);
}

View File

@ -8,7 +8,7 @@ export const fetchCIMonitor = async () => {
};
export const fetchReportCollector = async (msg: string) => {
const url = `https://report.imoaix.cn/report?msg=${msg}`;
const url = `https://report.imoaix.cn/summary?msg=${msg}`;
try {
const res = await fetch(url);
return ((await res.json()) as string) || "";