From b60bf841f4023286ea60ca2c7a692c8343414c40 Mon Sep 17 00:00:00 2001 From: sHa Date: Tue, 24 Mar 2026 00:19:17 +0200 Subject: [PATCH] feat: include watchers in issue details and update API call parameters --- .claude/settings.local.json | 7 +++++++ app/client.py | 2 +- app/entities/issues.py | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 .claude/settings.local.json diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 0000000..77d52e8 --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,7 @@ +{ + "permissions": { + "allow": [ + "WebFetch(domain:www.redmineup.com)" + ] + } +} diff --git a/app/client.py b/app/client.py index 08d79d7..357965b 100644 --- a/app/client.py +++ b/app/client.py @@ -31,7 +31,7 @@ def _post(path: str, body: dict) -> dict: with httpx.Client(timeout=15) as client: resp = client.post(url, headers=_headers(), content=json.dumps(body)) resp.raise_for_status() - return resp.json() + return resp.json() if resp.content else {} def _delete(path: str) -> None: diff --git a/app/entities/issues.py b/app/entities/issues.py index e7fbaeb..d1dfe81 100644 --- a/app/entities/issues.py +++ b/app/entities/issues.py @@ -71,9 +71,9 @@ def get_issue(issue_id: int) -> str: """ Get a Redmine issue by ID. Returns full issue details: title, description, status, priority, - assignee, progress, dates, custom fields. + assignee, progress, dates, custom fields, watchers. """ - data = _get(f"/issues/{issue_id}.json") + data = _get(f"/issues/{issue_id}.json", params={"include": "watchers"}) return json.dumps(data["issue"], ensure_ascii=False, indent=2)