(payload: dict)
| 59 | |
| 60 | |
| 61 | async 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 | |
| 73 | async def _verify_signature(secret: bytes, sig: str, msg: bytes) -> bool: |
no outgoing calls
no test coverage detected