octomachinery.github.utils.event_utils module¶

Utility helpers for CLI.

octomachinery.github.utils.event_utils.augment_http_headers(headers: CIMultiDict[str]) → CIMultiDict[str][source]¶

Add fake HTTP headers for the missing positions.

octomachinery.github.utils.event_utils.make_http_headers_from_event(event_name: str) → CIMultiDict[str][source]¶

Generate fake HTTP headers with the given event name.

octomachinery.github.utils.event_utils.parse_event_stub_from_fd(event_file_fd: IO[str]) → Tuple[CIMultiDict[str], Mapping[str, object]][source]¶

Read event with HTTP headers as CIMultiDict instance.

octomachinery.github.utils.event_utils.validate_http_headers(headers: Mapping[str, Any]) → None[source]¶

Verify that HTTP headers look sane.