Skip to content

Commit c2f99a5

Browse files
authored
fix(iterate-pr): Remove default Claude attribution (#169)
2 parents 6abccd6 + aaa8515 commit c2f99a5

1 file changed

Lines changed: 3 additions & 22 deletions

File tree

‎skills/iterate-pr/scripts/reply_to_thread.py‎

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,14 @@
1212
Batches all replies into a single GraphQL mutation for efficiency.
1313
1414
Example:
15-
uv run reply_to_thread.py PRRT_abc "Fixed the issue.\n\n*— Claude Code*"
15+
uv run reply_to_thread.py PRRT_abc "Fixed the issue."
1616
uv run reply_to_thread.py PRRT_abc "Fixed." PRRT_def "Also fixed."
1717
"""
1818

1919
from __future__ import annotations
2020

2121
import argparse
2222
import json
23-
import re
2423
import subprocess
2524
import sys
2625

@@ -29,27 +28,9 @@ def _normalize_body(body: str) -> str:
2928
"""Normalize escaped newlines from shell input.
3029
3130
Bash double quotes keep "\\n" literal, but reply bodies should contain
32-
actual newlines for readability/signatures.
31+
actual newlines for readability.
3332
"""
34-
normalized = body.replace("\\r\\n", "\\n").replace("\\n", "\n")
35-
36-
# Add Claude Code attribution if not already present
37-
# Check if the last line matches the bot signature pattern: *— Bot Name* or *- Bot Name*
38-
lines = normalized.rstrip().split("\n")
39-
last_line = lines[-1] if lines else ""
40-
41-
# Match bot signatures like "*— Claude Code*", "*- Any Bot*", etc.
42-
bot_signature_pattern = r"^\*[—-]\s+.+\*$"
43-
44-
if not re.match(bot_signature_pattern, last_line.strip()):
45-
# Ensure proper spacing before attribution
46-
if normalized and not normalized.endswith("\n"):
47-
normalized += "\n"
48-
if normalized and not normalized.endswith("\n\n"):
49-
normalized += "\n"
50-
normalized += "*— Claude Code*"
51-
52-
return normalized
33+
return body.replace("\\r\\n", "\\n").replace("\\n", "\n")
5334

5435

5536
def reply_to_threads(pairs: list[tuple[str, str]]) -> list[tuple[str, bool]]:

0 commit comments

Comments
 (0)