47degrees/github4s

Label id is Long, not Int

dcsobral opened this issue · 2 comments

I'm getting errors on new repositories because new labels are not getting ids that are greater than Int.MaxValue. For example: https://api.github.com/repos/precog/quasar-datasource-kafka/labels/:robot:

{
  "id": 2167724672,
  "node_id": "MDU6TGFiZWwyMTY3NzI0Njcy",
  "url": "https://api.github.com/repos/precog/quasar-datasource-kafka/labels/:robot:",
  "name": ":robot:",
  "color": "ffffff",
  "default": false,
  "description": ""
}

It fails to decode with this as the cause:

DecodingFailure(Int, List(DownField(id), DownArray))

A quick check revealed that 2167724672 is not an Int:

scala> 2167724672
<console>:1: error: integer number too large

I believe this has been already fixed in #523, hopefully there will be a release soon

@juanpedromoreno Indeed. That should teach me to look at the actual code instead of the code for the version I'm using.