From 8dd7dff56e5fbf667e8f8ad41bb04b550f5eb1c6 Mon Sep 17 00:00:00 2001 From: Gustav Westling Date: Wed, 20 Dec 2023 15:50:24 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=BD=20re-generate=20models?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- githubkit/rest/activity.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/githubkit/rest/activity.py b/githubkit/rest/activity.py index 4a03a1280..985673b51 100644 --- a/githubkit/rest/activity.py +++ b/githubkit/rest/activity.py @@ -418,6 +418,38 @@ async def async_get_thread( }, ) + def mark_thread_as_done( + self, + thread_id: int, + *, + headers: Optional[Dict[str, str]] = None, + ) -> "Response": + url = f"/notifications/threads/{thread_id}" + + headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})} + + return self._github.request( + "DELETE", + url, + headers=exclude_unset(headers), + ) + + async def async_mark_thread_as_done( + self, + thread_id: int, + *, + headers: Optional[Dict[str, str]] = None, + ) -> "Response": + url = f"/notifications/threads/{thread_id}" + + headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})} + + return await self._github.arequest( + "DELETE", + url, + headers=exclude_unset(headers), + ) + def mark_thread_as_read( self, thread_id: int,