All checks were successful
Egg Server MIflow / build-image (push) Successful in 1m5s
27 lines
755 B
TypeScript
27 lines
755 B
TypeScript
import { LarkEvent } from "../../types"
|
|
import { NetToolBase } from "../../utils/netTool"
|
|
|
|
class AttachService extends NetToolBase {
|
|
/**
|
|
* 监控CI状态
|
|
* @param {string} chat_id - 聊天ID。
|
|
* @returns {Promise<string>} 返回CI监控结果。
|
|
*/
|
|
async ciMonitor(chat_id: string) {
|
|
const URL = `https://ci-monitor.xiaomiwh.cn/gitlab/ci?chat_id=${chat_id}`
|
|
return this.get(URL).catch(() => "")
|
|
}
|
|
|
|
/**
|
|
* 收集报告数据
|
|
* @param {LarkEvent.Data} body - 报告数据。
|
|
* @returns {Promise<string>} 返回报告收集结果。
|
|
*/
|
|
async reportCollector(body: LarkEvent.Data) {
|
|
const URL = "https://report.imoaix.cn/report"
|
|
return this.post(URL, body).catch(() => "")
|
|
}
|
|
}
|
|
|
|
export default AttachService
|