MCPcopy Create free account
hub / github.com/dashezup/github-webhook-to-telegram / github_webhook_post_handler

Function github_webhook_post_handler

main.py:42–47  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

40
41@routes.post("/")
42async def github_webhook_post_handler(request: Request) -> Response:
43 tg_chat_id: Union[str, int, bool] = await validate_github_webhook(request)
44 if not tg_chat_id:
45 return web.Response(status=403, text="403: Forbidden")
46 tg_status = await send_to_telegram(session, tg_chat_id, request)
47 return web.Response(text=f"Send to Telegram: {tg_status}")
48
49
50async def get_session() -> ClientSession:

Callers

nothing calls this directly

Calls 2

validate_github_webhookFunction · 0.90
send_to_telegramFunction · 0.90

Tested by

no test coverage detected