redhat-aqe / review-rot

GNU General Public License v3.0
13 stars 16 forks source link

Invalid json format #75

Closed lcarva closed 5 years ago

lcarva commented 5 years ago

With this configuration:

git_services:
  - type: pagure
    host: pagure.io
    repos:
    - fm-orchestrator

review-rot output invalid json:

🐚 review-rot -c configuration.yaml -f json
[
None
{
  "user": "merlinm",
  "title": "WIP module scratch builds",
  "url": "https://pagure.io/fm-orchestrator/pull-request/1136",
  "relative_time": "5 days",
  "time": 1549664519.0,
  "comments": 4,
  "type": "PagureReview",
  "image": "https://seccdn.libravatar.org/avatar/703db885ef67e2f87122e6ddcdf16a0b4352b857a4f99dd0896ce8c78acf3382?s=64&d=retro",
  "last_comment": {
    "author": "mvadkert",
    "created_at": 1550075633.0
  }
},
{
  "user": "jkaluza",
  "title": "Fix the handling of modulemd files with unicode characters.",
  "url": "https://pagure.io/fm-orchestrator/pull-request/1144",
  "relative_time": "1 day 3 hours",
  "time": 1550001036.0,
  "comments": 17,
  "type": "PagureReview",
  "image": "https://seccdn.libravatar.org/avatar/1ecc757d81ddcab5c53f2d5741595dece34d1e6519a39d57a8fa4af6b8b12b11?s=64&d=retro",
  "last_comment": {
    "author": "jkaluza",
    "created_at": 1550080938.0
  }
}
]

Notice the odd None on second line.

lcarva commented 5 years ago

Appears to have been introduced in https://github.com/nirzari/review-rot/commit/7fe84e897909642f45d48cba6ea87529aa02d0cb

nirzari commented 5 years ago

@pbortlov FYI ^^