@@ -2641,6 +2641,20 @@ 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+ author_name = str_strip_lower (getattr (user_commit_summary , "author_name" , None ))
2653+
2654+ if author_id is not None or author_login or author_email :
2655+ return (author_id , author_login , author_email , "" )
2656+ return (None , "" , "" , author_name )
2657+
26442658def update_pull_request (
26452659 installation_id ,
26462660 github_repository_id ,
@@ -2697,6 +2711,7 @@ def update_pull_request(
26972711 if missing :
26982712 text = ""
26992713 help_url = ""
2714+ seen_render_keys = set ()
27002715
27012716 for user_commit_summary in missing :
27022717 # Check for valid GitHub id
@@ -2708,6 +2723,10 @@ def update_pull_request(
27082723 "github" , str (installation_id ), github_repository_id , pull_request .number , project_version
27092724 )
27102725
2726+ render_key = check_run_render_key (user_commit_summary )
2727+ if render_key in seen_render_keys :
2728+ continue
2729+ seen_render_keys .add (render_key )
27112730 text += user_commit_summary .get_display_text (tag_user = True )
27122731
27132732 payload = {
0 commit comments