fix(mention): address PR #45 review feedback (M1-M3, S1-S3)
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 8s
CI / notify-on-failure (pull_request) Successful in 0s

M1: Remove '帮忙' from help_keywords to fix keyword priority bug
M3: Add unit tests for mention_utils (§25.7)
S1: Merge two 'if action == opened' blocks in _handle_issues
S2: Extract _send_review_mentions helper to deduplicate @mention code
S3: Remove redundant 'import re' inside conditional block
This commit is contained in:
cfdaily
2026-06-12 18:56:49 +08:00
parent f25af64f00
commit e7f28cd36e
3 changed files with 172 additions and 48 deletions
+2 -2
View File
@@ -110,8 +110,8 @@ def infer_intent(body: str) -> str:
if any(kw in body for kw in assign_keywords):
return "assign"
# 求助关键词
help_keywords = ["怎么", "如何", "", "?", "什么", "哪个", "能否", "帮忙"]
# 求助关键词(注意:"帮忙"已由 assign_keywords 的"帮忙做"覆盖,"请帮忙"由 collab_keywords 覆盖)
help_keywords = ["怎么", "如何", "", "?", "什么", "哪个", "能否"]
if any(kw in body for kw in help_keywords):
return "help"