You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some Github repo commits don't have a valid author.
Example: curl https://api.github.com/repos/TNG/ArchUnit/commits/c395bc282b6c52feb0165a1657086d711547829f.
In this case, the API returns null for the author field.
This cannot be deserialized properly into a User struct by serde.
As a result, we're getting errors when using hubcaps to read a list of commits over here:
hubcaps should not throw an error or this edge-case should be documented with a workaround.
I was also thinking that the author field might be optional and be None in case of null, but that would be a breaking change and it would make the normal flow a bit more cumbersome.
🐛 Bug description
Some Github repo commits don't have a valid author.
Example:
curl https://api.github.com/repos/TNG/ArchUnit/commits/c395bc282b6c52feb0165a1657086d711547829f
.In this case, the API returns
null
for the author field.This cannot be deserialized properly into a
User
struct by serde.As a result, we're getting errors when using hubcaps to read a list of commits over here:
(See the example code below to reproduce.)
🤔 Expected Behavior
hubcaps should not throw an error or this edge-case should be documented with a workaround.
I was also thinking that the author field might be optional and be
None
in case ofnull
, but that would be a breaking change and it would make the normal flow a bit more cumbersome.👟 Steps to reproduce
🌍 Your environment
hubcaps version: 0.6.1
tokio: 0.2
Credits
@AristoChen for finding the bug.
The text was updated successfully, but these errors were encountered: