fix(mention): address PR #45 review feedback (M1-M3, S1-S3)
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:
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user