zulip/zerver/webhooks/github/headers.py
Hemanth V. Alluri 37d90d9add webhooks: Migrate the GitHub integration to new http headers system.
Idea courtesy of tabbott. See PR #12515 for more details.
2019-06-20 16:37:42 -07:00

9 lines
239 B
Python

from typing import Dict
def fixture_to_headers(filename: str) -> Dict[str, str]:
if '__' in filename:
event_type = filename.split("__")[0]
else:
event_type = filename
return {"HTTP_X_GITHUB_EVENT": event_type}