diff --git a/src/gitea_runner_manager/api_clients.py b/src/gitea_runner_manager/api_clients.py index 571dfc8..0cb692b 100644 --- a/src/gitea_runner_manager/api_clients.py +++ b/src/gitea_runner_manager/api_clients.py @@ -163,7 +163,7 @@ class VikunjaClient: return r.json() def post_comment(self, task_id: int, comment: str) -> None: - self._request("POST", f"/tasks/{task_id}/comments", json={"comment": comment}) + self._request("PUT", f"/tasks/{task_id}/comments", json={"comment": comment}) def update_task(self, task_id: int, **fields: Any) -> None: self._request("POST", f"/tasks/{task_id}", json=fields) diff --git a/tests/unit/test_api_clients.py b/tests/unit/test_api_clients.py index 9304e6e..e701fe1 100644 --- a/tests/unit/test_api_clients.py +++ b/tests/unit/test_api_clients.py @@ -268,7 +268,7 @@ class TestVikunjaClient: client.post_comment(42, "

hi

") client._session.request.assert_called_once_with( - "POST", + "PUT", "https://work.example.com/tasks/42/comments", timeout=DEFAULT_TIMEOUT, json={"comment": "

hi

"},