mirror of
https://github.com/shadoll/redmine-mcp.git
synced 2026-08-28 03:27:56 +00:00
feat: include watchers in issue details and update API call parameters
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"permissions": {
|
||||||
|
"allow": [
|
||||||
|
"WebFetch(domain:www.redmineup.com)"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -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:
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user