Skip to content

Commit e08db63

Browse files
committed
Не реагировать на удаление звезд, офф. debug
1 parent 46291de commit e08db63

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

modules/webhooks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,9 @@ async def github(request: aiohttp.web.Request):
137137
):
138138
return aiohttp.web.Response(text="Не авторизован", status=401)
139139
load: dict[str] = cast(dict[str], await request.json())
140-
logger.info(f"debug: {load}")
141140
if request.headers.get("X-Github-Event") == "star":
141+
if load.get("action") == "deleted":
142+
return aiohttp.web.Response(text="ok")
142143
logger.info(f"Звезда! Репо {load['repository']['name']}")
143144
await client.send_message(
144145
repos.get(load["repository"]["name"], {}).get(

0 commit comments

Comments
 (0)