fix: 更新命令处理逻辑,支持以前缀匹配的方式识别CI和MR相关命令
This commit is contained in:
parent
af52f2d91f
commit
d8ec3fbfca
@ -142,7 +142,7 @@ const manageCMDMsg = async (ctx: Context) => {
|
||||
}
|
||||
|
||||
// 关闭CICD成功提醒
|
||||
if (msgText === "/ci off") {
|
||||
if (msgText.startsWith("/ci off")) {
|
||||
logger.info(`bot command is /notify ci off, chatId: ${chatId}`)
|
||||
await gitlabEvent.register.closeCICDNotify(
|
||||
ctx,
|
||||
@ -152,7 +152,7 @@ const manageCMDMsg = async (ctx: Context) => {
|
||||
}
|
||||
|
||||
// 开启MR自动总结
|
||||
if (msgText === "/mr") {
|
||||
if (msgText.startsWith("/mr")) {
|
||||
logger.info(`bot command is /mr, chatId: ${chatId}`)
|
||||
await gitlabEvent.register.openMRSummary(
|
||||
ctx,
|
||||
@ -162,7 +162,7 @@ const manageCMDMsg = async (ctx: Context) => {
|
||||
}
|
||||
|
||||
// 关闭MR自动总结
|
||||
if (msgText === "/mr off") {
|
||||
if (msgText.startsWith("/mr off")) {
|
||||
logger.info(`bot command is /mr off, chatId: ${chatId}`)
|
||||
await gitlabEvent.register.closeMRSummary(
|
||||
ctx,
|
||||
|
Loading…
x
Reference in New Issue
Block a user