chore: commit all pending changes

This commit is contained in:
2026-06-04 14:58:00 +08:00
parent 8c7c713fee
commit 9cde462cd1
7 changed files with 248 additions and 10 deletions

View File

@@ -5,6 +5,12 @@ from pathlib import Path
from urllib import request
def _payload_for_webhook(payload: dict) -> dict:
outbound = dict(payload)
outbound.pop("tracks", None)
return outbound
def dispatch_json_event(
path: str | Path,
payload: dict,
@@ -21,7 +27,7 @@ def dispatch_json_event(
req = request.Request(
url=webhook_url,
data=json.dumps(payload).encode("utf-8"),
data=json.dumps(_payload_for_webhook(payload)).encode("utf-8"),
method="POST",
)
req.add_header("Content-Type", "application/json")