feat: include watchers in issue details and update API call parameters

This commit is contained in:
sha
2026-03-24 00:19:17 +02:00
parent 46bc74af37
commit b60bf841f4
3 changed files with 10 additions and 3 deletions
+7
View File
@@ -0,0 +1,7 @@
{
"permissions": {
"allow": [
"WebFetch(domain:www.redmineup.com)"
]
}
}
+1 -1
View File
@@ -31,7 +31,7 @@ def _post(path: str, body: dict) -> dict:
with httpx.Client(timeout=15) as client: with httpx.Client(timeout=15) as client:
resp = client.post(url, headers=_headers(), content=json.dumps(body)) resp = client.post(url, headers=_headers(), content=json.dumps(body))
resp.raise_for_status() resp.raise_for_status()
return resp.json() return resp.json() if resp.content else {}
def _delete(path: str) -> None: def _delete(path: str) -> None:
+2 -2
View File
@@ -71,9 +71,9 @@ def get_issue(issue_id: int) -> str:
""" """
Get a Redmine issue by ID. Get a Redmine issue by ID.
Returns full issue details: title, description, status, priority, 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) return json.dumps(data["issue"], ensure_ascii=False, indent=2)