auto-sync: 2026-06-09 08:30:45
This commit is contained in:
@@ -74,7 +74,8 @@ def _is_duplicate(event: str, delivery: str, payload: Optional[Dict[str, Any]] =
|
||||
review = payload.get("review", {})
|
||||
# 取 body 或 content,优先 body(webhookNotifier 格式)
|
||||
content = review.get("body", "") or review.get("content", "")
|
||||
content_key = f"content:{event}:{pr_num}:{sender}:{content}"
|
||||
content_hash = hashlib.sha256(content.encode()).hexdigest()[:16]
|
||||
content_key = f"content:{event}:{pr_num}:{sender}:{content_hash}"
|
||||
if content_key in _delivery_cache:
|
||||
logger.info("Content-based duplicate detected: %s PR#%s by %s", event, pr_num, sender)
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user