philips-labs/tabia

Github format json is wrongly serializing the visibility

marcofranssen opened this issue · 0 comments

Currently:

$ tabia github repositories -O philips-labs -F json
[
  {
    "name": "tabia",
    "id": "MDEwOlJlcG9zaXRvcnkyNjUzMDYzNzU=",
    "url": "https://github.com/philips-labs/tabia",
    "ssh_url": "git@github.com:philips-labs/tabia.git",
    "owner": "philips-labs",
    "created_at": "2020-05-19T16:50:46Z",
    "updated_at": "2020-07-20T13:31:06Z",
    "pushed_at": "2020-07-20T13:32:18Z"
  },
  {
    "name": "internal-example",
    "id": "MDEwOlJlcG9zaXRvcnkyNjUzMDYzNzU=",
    "url": "https://github.com/philips-labs/internal-example",
    "ssh_url": "git@github.com:philips-labs/internal-example.git",
    "owner": "philips-labs",
    "is_private": 1,
    "created_at": "2020-05-19T16:50:46Z",
    "updated_at": "2020-07-20T13:31:06Z",
    "pushed_at": "2020-07-20T13:32:18Z"
  },
  {
    "name": "private-example",
    "id": "MDEwOlJlcG9zaXRvcnkyNjUzMDYzNzU=",
    "url": "https://github.com/philips-labs/private-example",
    "ssh_url": "git@github.com:philips-labs/private-example.git",
    "owner": "philips-labs",
    "is_private": 2,
    "created_at": "2020-05-19T16:50:46Z",
    "updated_at": "2020-07-20T13:31:06Z",
    "pushed_at": "2020-07-20T13:32:18Z"
  },
]

Expected:

See is_private is renamed to visibility and values are represented as string as opposed to integer.

$ tabia github repositories -O philips-labs -F json
[
  {
    "name": "tabia",
    "id": "MDEwOlJlcG9zaXRvcnkyNjUzMDYzNzU=",
    "url": "https://github.com/philips-labs/tabia",
    "ssh_url": "git@github.com:philips-labs/tabia.git",
    "owner": "philips-labs",
    "visibility": "Public",
    "created_at": "2020-05-19T16:50:46Z",
    "updated_at": "2020-07-20T13:31:06Z",
    "pushed_at": "2020-07-20T13:32:18Z"
  },
  {
    "name": "internal-example",
    "id": "MDEwOlJlcG9zaXRvcnkyNjUzMDYzNzU=",
    "url": "https://github.com/philips-labs/internal-example",
    "ssh_url": "git@github.com:philips-labs/internal-example.git",
    "owner": "philips-labs",
    "visibility": "Internal",
    "created_at": "2020-05-19T16:50:46Z",
    "updated_at": "2020-07-20T13:31:06Z",
    "pushed_at": "2020-07-20T13:32:18Z"
  },
  {
    "name": "private-example",
    "id": "MDEwOlJlcG9zaXRvcnkyNjUzMDYzNzU=",
    "url": "https://github.com/philips-labs/private-example",
    "ssh_url": "git@github.com:philips-labs/private-example.git",
    "owner": "philips-labs",
    "visibility": "Private",
    "created_at": "2020-05-19T16:50:46Z",
    "updated_at": "2020-07-20T13:31:06Z",
    "pushed_at": "2020-07-20T13:32:18Z"
  },
]