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

Function _get_hook_target

utils/github_webhook.py:61–70  ·  view source on GitHub ↗
(payload: dict)

Source from the content-addressed store, hash-verified

59
60
61async def _get_hook_target(payload: dict) -> Optional[dict]:
62 name = (payload.get('organization', {}).get('login')
63 or payload.get('repository', {}).get('full_name'))
64 if not name:
65 logging.warning("no repo or organization found")
66 return None
67 target = GH_WEBHOOKS.get(name, None)
68 if not target:
69 logging.warning("unknown repo or organization")
70 return target
71
72
73async def _verify_signature(secret: bytes, sig: str, msg: bytes) -> bool:

Callers 1

validate_github_webhookFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected