omsf-eco-infra / ticgithub

Tools to use a GitHub repository as a support ticket system
MIT License
0 stars 0 forks source link

Force `_get_frontmatter` to return dict #44

Closed dwhswenson closed 1 year ago

dwhswenson commented 1 year ago

This solves a problem with manually-created issues not having raising a TypeError (because we later use getitem with string keys on a string object).

Logic here is that if it isn't a dict already, then it wasn't valid frontmatter, so we return an empty dict for typing convenience and let other parts of the code handle the fact that this wasn't an email ticket.