Skip to content
This repository was archived by the owner on Nov 10, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed

- **Removed the dead public helper `get_context_window` from `claude_task_master.core`.** Defined in `core/agent_models.py`, re-exported through the `core` package facade and referenced by a docstring clause in `core/config.py`, it had no caller anywhere in the codebase, and its return value set no compaction threshold and no SDK context window — a model-to-window mapping nothing consumed. The data behind it is retained: `MODEL_CONTEXT_WINDOWS`, `MODEL_CONTEXT_WINDOWS_STANDARD`, `DEFAULT_COMPACT_THRESHOLD_PERCENT` and `ContextWindowsConfig` are unchanged; only the unreachable accessor and the text naming it are deleted.
- **Removed the dead `_format_pr_comments` GraphQL formatter (`github/client_pr_helpers.py`).** The REST path `_format_pr_comments_from_rest` is the only PR-comment formatter with a caller; the GraphQL variant had no call site anywhere in the codebase and no test references it. Removed together with its entry in both `__all__` lists (`client_pr_helpers.py` and `client_pr.py`) and the corresponding `client_pr` backward-compat re-export; the five live sibling helpers are unchanged.

### Fixed

Expand Down
2 changes: 0 additions & 2 deletions src/claude_task_master/github/client_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

from .client_pr_helpers import ( # noqa: F401 — re-exported for backward compat
_build_pr_status_query,
_format_pr_comments,
_format_pr_comments_from_rest,
_get_comment_resolved_map,
_parse_check_contexts,
Expand Down Expand Up @@ -314,6 +313,5 @@ def get_pr_comments(
"_build_pr_status_query",
"_parse_pr_status_response",
"_parse_check_contexts",
"_format_pr_comments",
"_format_pr_comments_from_rest",
]
30 changes: 0 additions & 30 deletions src/claude_task_master/github/client_pr_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,35 +405,6 @@ def _parse_check_contexts(contexts: list[dict[str, Any]]) -> list[dict[str, Any]
return check_details


def _format_pr_comments(threads: list[dict[str, Any]], only_unresolved: bool) -> str:
"""Format PR review threads into a readable string.

Args:
threads: List of review thread nodes.
only_unresolved: If True, only include unresolved threads.

Returns:
Formatted string of comments.
"""
formatted = []
for thread in threads:
if only_unresolved and thread["isResolved"]:
continue

for comment in thread["comments"]["nodes"]:
# GraphQL author is null for ghost/deleted accounts.
author = (comment.get("author") or {}).get("login") or "unknown"
is_bot = author.endswith("[bot]")
bot_marker = " (bot)" if is_bot else ""

formatted.append(
f"**{author}{bot_marker}** on {comment.get('path', 'PR')}:"
f"{comment.get('line', 'N/A')}\n{comment['body']}\n"
)

return "\n---\n\n".join(formatted)


def _format_pr_comments_from_rest(
comments: list[dict[str, Any]], resolved_map: dict[int, bool], only_unresolved: bool
) -> str:
Expand Down Expand Up @@ -474,6 +445,5 @@ def _format_pr_comments_from_rest(
"_build_pr_status_query",
"_parse_pr_status_response",
"_parse_check_contexts",
"_format_pr_comments",
"_format_pr_comments_from_rest",
]
Loading