@@ -2641,6 +2641,18 @@ def normalize_comment(s: str) -> str:
26412641 lines .pop ()
26422642 return "\n " .join (lines )
26432643
2644+ def check_run_render_key (user_commit_summary ):
2645+ """
2646+ Dedupe key for rendering check-run text.
2647+ Prefer stable actor identity (id/login/email). If all are missing, fall back to name.
2648+ """
2649+ author_id = getattr (user_commit_summary , "author_id" , None )
2650+ author_login = str_strip_lower (getattr (user_commit_summary , "author_login" , None ))
2651+ author_email = str_strip_lower (getattr (user_commit_summary , "author_email" , None ))
2652+ if author_id is not None or author_login or author_email :
2653+ return (author_id , author_login , author_email )
2654+ return (None , "" , "" , str_strip_lower (getattr (user_commit_summary , "author_name" , None )))
2655+
26442656def update_pull_request (
26452657 installation_id ,
26462658 github_repository_id ,
@@ -2697,6 +2709,7 @@ def update_pull_request(
26972709 if missing :
26982710 text = ""
26992711 help_url = ""
2712+ seen_render_keys = set ()
27002713
27012714 for user_commit_summary in missing :
27022715 # Check for valid GitHub id
@@ -2708,6 +2721,10 @@ def update_pull_request(
27082721 "github" , str (installation_id ), github_repository_id , pull_request .number , project_version
27092722 )
27102723
2724+ render_key = check_run_render_key (user_commit_summary )
2725+ if render_key in seen_render_keys :
2726+ continue
2727+ seen_render_keys .add (render_key )
27112728 text += user_commit_summary .get_display_text (tag_user = True )
27122729
27132730 payload = {
0 commit comments