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
{{ message }}
Repository navigation
Broken decoding of Issue without a body (when its a PR) #233
Good catch @YarekTyshchenko, we have two different operations for Issues and PRs. I'm wondering what will be the right behavior here. I guess the easy one is just to make optional the body in the Issue model.
Could filter out PRs from the issue endpoint, but it would cause unnecessary traffic. I'd be happy with an Optional body for now, since even in the docs they tell you to filter them yourself based on the presence of the pr urls field
That test is failing because issue #1 has a body, and the test expects an empty body.
But if we use other issue with an empty body (that is a PR), like #154 , instead of receiving and empty body decoded to None, circe is decoding it to Some() 😵
More debugging is needed to know why that is happening 🤔
I've seen this before, Some PRs have empty body (from json response ""), some actual null. I can't see any regularity, but i know that once the PR is edited it will never have a null body. I can only replicate this with a private repo atm
Activity
fedefernandez commentedon Dec 12, 2018
Good catch @YarekTyshchenko, we have two different operations for Issues and PRs. I'm wondering what will be the right behavior here. I guess the easy one is just to make optional the body in the
Issuemodel.YarekTyshchenko commentedon Dec 12, 2018
Could filter out PRs from the issue endpoint, but it would cause unnecessary traffic. I'd be happy with an Optional body for now, since even in the docs they tell you to filter them yourself based on the presence of the pr urls field
juanpedromoreno commentedon Dec 27, 2018
It seems like #236 has introduced a random test failure, which I've ignored here: 24dd556, as part of #243.
We might want to re-visit this issue later on.
JesusMtnez commentedon Jan 4, 2019
I've done some debugging.
That test is failing because issue #1 has a body, and the test expects an empty body.
But if we use other issue with an empty body (that is a PR), like #154 , instead of receiving and empty body decoded to
None, circe is decoding it toSome()😵More debugging is needed to know why that is happening 🤔
YarekTyshchenko commentedon Jan 4, 2019
I've seen this before, Some PRs have empty body (from json response
""), some actualnull. I can't see any regularity, but i know that once the PR is edited it will never have a null body. I can only replicate this with a private repo atmYarekTyshchenko commentedon Jan 4, 2019
I create my PRs with
hubutility. It could be a factorJesusMtnez commentedon Jan 4, 2019
🤔
Issuesis implemented using circe generic auto, maybe we could implement the decoders/encoders making them handle those cases