From aaa85152005936dddd0ea1451d791ff234f04771 Mon Sep 17 00:00:00 2001 From: Arsalan Bashir Date: Mon, 24 Aug 2026 16:02:03 -0700 Subject: [PATCH] fix(iterate-pr): Remove default Claude attribution --- skills/iterate-pr/scripts/reply_to_thread.py | 25 +++----------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/skills/iterate-pr/scripts/reply_to_thread.py b/skills/iterate-pr/scripts/reply_to_thread.py index 51bfa6a..cff04a0 100644 --- a/skills/iterate-pr/scripts/reply_to_thread.py +++ b/skills/iterate-pr/scripts/reply_to_thread.py @@ -12,7 +12,7 @@ Batches all replies into a single GraphQL mutation for efficiency. Example: - uv run reply_to_thread.py PRRT_abc "Fixed the issue.\n\n*— Claude Code*" + uv run reply_to_thread.py PRRT_abc "Fixed the issue." uv run reply_to_thread.py PRRT_abc "Fixed." PRRT_def "Also fixed." """ @@ -20,7 +20,6 @@ import argparse import json -import re import subprocess import sys @@ -29,27 +28,9 @@ def _normalize_body(body: str) -> str: """Normalize escaped newlines from shell input. Bash double quotes keep "\\n" literal, but reply bodies should contain - actual newlines for readability/signatures. + actual newlines for readability. """ - normalized = body.replace("\\r\\n", "\\n").replace("\\n", "\n") - - # Add Claude Code attribution if not already present - # Check if the last line matches the bot signature pattern: *— Bot Name* or *- Bot Name* - lines = normalized.rstrip().split("\n") - last_line = lines[-1] if lines else "" - - # Match bot signatures like "*— Claude Code*", "*- Any Bot*", etc. - bot_signature_pattern = r"^\*[—-]\s+.+\*$" - - if not re.match(bot_signature_pattern, last_line.strip()): - # Ensure proper spacing before attribution - if normalized and not normalized.endswith("\n"): - normalized += "\n" - if normalized and not normalized.endswith("\n\n"): - normalized += "\n" - normalized += "*— Claude Code*" - - return normalized + return body.replace("\\r\\n", "\\n").replace("\\n", "\n") def reply_to_threads(pairs: list[tuple[str, str]]) -> list[tuple[str, bool]]: