-
Notifications
You must be signed in to change notification settings - Fork 8
feat: add configurable mention triggers support #334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
CarlJi
commented
Aug 26, 2025
- Add mention configuration to config structure with triggers array and default trigger
- Implement enhanced mention parsing with regex-based exact matching
- Support multiple mention triggers (@ai, @code-assistant, @qiniu-ci)
- Add comprehensive test coverage for mention parsing functionality
- Maintain backward compatibility with existing @qiniu-ci trigger
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #334 +/- ##
=======================================
Coverage ? 12.86%
=======================================
Files ? 52
Lines ? 11052
Branches ? 0
=======================================
Hits ? 1422
Misses ? 9482
Partials ? 148
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
config.example.yaml
Outdated
# Supports multiple triggers for different use cases | ||
triggers: | ||
- "@qiniu-ci" # Default company AI assistant | ||
- "@ai" # Short alias |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@qiniu-ci 帮我删除这行
/review |
🤖 代码审查结果 I have completed my comprehensive code review of PR #334. The review covers all aspects requested:
The PR implements configurable mention triggers with excellent test coverage (276 lines), maintains backward compatibility, and uses robust regex-based matching. I recommend APPROVAL with the noted minor improvements as optional enhancements for future iterations. |
pkg/models/events.go
Outdated
// 使用正则表达式进行精确匹配,参考claude-code-action的匹配规则 | ||
// 匹配规则:(^|\s)trigger([\s.,!?;:]|$) | ||
// - (^|\s): 匹配字符串开始或空白字符 | ||
// - trigger: 精确匹配触发短语 | ||
// - ([\s.,!?;:]|$): 匹配空白字符、标点符号或字符串结束 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/continue 删掉这里的注释
- Add mention configuration to config structure with triggers array and default trigger - Implement enhanced mention parsing with regex-based exact matching - Support multiple mention triggers (@ai, @code-assistant, @qiniu-ci) - Add comprehensive test coverage for mention parsing functionality - Maintain backward compatibility with existing @qiniu-ci trigger