inveniosoftware / invenio-github

GitHub integration for Invenio.
https://invenio-github.readthedocs.io
MIT License
6 stars 26 forks source link

api: fixed issue with release names being None or empty. #94

Closed alejandromumo closed 2 years ago

alejandromumo commented 2 years ago

closes https://github.com/zenodo/ops/issues/192

See the following record on Zenodo.

The record name is "None" as the record name is derived from the payload.event.release. For this specific release, we received the following name attribute in the payload:

{
  'action': 'published',
  'release': {
    'name': None,
  }
}

We also have scenarios on which the payload is sent with an empty string as a the release name attribute. Such cases are not handled properly, see the following record.

The difference between receiving an empty string "" or None is on Github's side.

slint commented 2 years ago

I'll give it a go locally and if it's all good merge it. Thanks for the fix!