auto-sync: 2026-06-09 08:30:45

This commit is contained in:
cfdaily
2026-06-09 08:30:45 +08:00
parent 38372786a2
commit f961037fd2
+2 -1
View File
@@ -74,7 +74,8 @@ def _is_duplicate(event: str, delivery: str, payload: Optional[Dict[str, Any]] =
review = payload.get("review", {})
# 取 body 或 content,优先 bodywebhookNotifier 格式)
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