Add "json" as output type #513

Merged
6543 merged 5 commits from 6543/tea:support_json_output into main 2 months ago
6543 commented 2 months ago
Collaborator
example
+-------+--------------------------------+-------+--------+-----------+------------------+--------------------------------+
| INDEX |             TITLE              | STATE | AUTHOR | MILESTONE |     UPDATED      |             LABELS             |
+-------+--------------------------------+-------+--------+-----------+------------------+--------------------------------+
|   514 | Find DefaultPRHead based on    | open  |   6543 | v0.10.0   | 2022-09-27 00:42 | kind/enhancement               |
|       | branch and SHA                 |       |        |           |                  |                                |
|   513 | Add "json" as output type      | open  |   6543 | v0.10.0   | 2022-09-26 23:58 | kind/enhancement               |
|   511 | WIP: `tea issue create`:       | open  | Norwin | v0.10.0   | 2022-09-21 19:01 | kind/feature                   |
|       | support issue templates &      |       |        |           |                  |                                |
|       | forms                          |       |        |           |                  |                                |
|   509 | WIP: Add Allow Maintainer      | open  |   6543 | v0.10.0   | 2022-09-27 00:12 | kind/enhancement               |
|       | Edits                          |       |        |           |                  |                                |
|   507 | WIP: improve sshcert           | open  | Norwin | v0.10.0   | 2022-09-26 22:34 | kind/enhancement               |
|       | authentication                 |       |        |           |                  | kind/refactor                  |
|   506 | Add `tea issue edit`           | open  | Norwin | v0.10.0   | 2022-09-26 23:48 | kind/feature                   |
|   473 | WIP: tea clone: set upstream   | open  | Norwin |           | 2022-03-19 12:30 | kind/enhancement               |
|       | remote for mirrors             |       |        |           |                  |                                |
|   395 | Drop features to reduce        | open  | Norwin |           | 2021-09-15 15:37 | kind/breaking                  |
|       | friction on first use          |       |        |           |                  | kind/proposal                  |
|   330 | WIP: print more issue details  | open  | Norwin |           | 2022-09-13 20:09 | kind/enhancement               |
|       |                                |       |        |           |                  | status/wip                     |
+-------+--------------------------------+-------+--------+-----------+------------------+--------------------------------+

will be:

[
  {
    "index": 514,
    "title": "Find DefaultPRHead based on branch and SHA",
    "state": "open",
    "author": 6543,
    "milestone": "v0.10.0",
    "updated": "2022-09-26T22:42:43Z",
    "labels": "kind/enhancement"
  },
  {
    "index": 513,
    "title": "Add "json" as output type",
    "state": "open",
    "author": 6543,
    "milestone": "v0.10.0",
    "updated": "2022-09-26T21:58:03Z",
    "labels": "kind/enhancement"
  },
  {
    "index": 511,
    "title": "WIP: `tea issue create`: support issue templates & forms",
    "state": "open",
    "author": "Norwin",
    "milestone": "v0.10.0",
    "updated": "2022-09-21T17:01:22Z",
    "labels": "kind/feature"
  },
  {
    "index": 509,
    "title": "WIP: Add Allow Maintainer Edits",
    "state": "open",
    "author": 6543,
    "milestone": "v0.10.0",
    "updated": "2022-09-26T22:12:14Z",
    "labels": "kind/enhancement"
  },
  {
    "index": 507,
    "title": "WIP: improve sshcert authentication",
    "state": "open",
    "author": "Norwin",
    "milestone": "v0.10.0",
    "updated": "2022-09-26T20:34:11Z",
    "labels": "kind/enhancement kind/refactor"
  },
  {
    "index": 506,
    "title": "Add `tea issue edit`",
    "state": "open",
    "author": "Norwin",
    "milestone": "v0.10.0",
    "updated": "2022-09-26T21:48:32Z",
    "labels": "kind/feature"
  },
  {
    "index": 473,
    "title": "WIP: tea clone: set upstream remote for mirrors",
    "state": "open",
    "author": "Norwin",
    "milestone": "",
    "updated": "2022-03-19T11:30:45Z",
    "labels": "kind/enhancement"
  },
  {
    "index": 395,
    "title": "Drop features to reduce friction on first use",
    "state": "open",
    "author": "Norwin",
    "milestone": "",
    "updated": "2021-09-15T13:37:51Z",
    "labels": "kind/breaking kind/proposal"
  },
  {
    "index": 330,
    "title": "WIP: print more issue details",
    "state": "open",
    "author": "Norwin",
    "milestone": "",
    "updated": "2022-09-13T18:09:56Z",
    "labels": "kind/enhancement status/wip"
  }
]
<details> <summary>example</summary> ```txt +-------+--------------------------------+-------+--------+-----------+------------------+--------------------------------+ | INDEX | TITLE | STATE | AUTHOR | MILESTONE | UPDATED | LABELS | +-------+--------------------------------+-------+--------+-----------+------------------+--------------------------------+ | 514 | Find DefaultPRHead based on | open | 6543 | v0.10.0 | 2022-09-27 00:42 | kind/enhancement | | | branch and SHA | | | | | | | 513 | Add "json" as output type | open | 6543 | v0.10.0 | 2022-09-26 23:58 | kind/enhancement | | 511 | WIP: `tea issue create`: | open | Norwin | v0.10.0 | 2022-09-21 19:01 | kind/feature | | | support issue templates & | | | | | | | | forms | | | | | | | 509 | WIP: Add Allow Maintainer | open | 6543 | v0.10.0 | 2022-09-27 00:12 | kind/enhancement | | | Edits | | | | | | | 507 | WIP: improve sshcert | open | Norwin | v0.10.0 | 2022-09-26 22:34 | kind/enhancement | | | authentication | | | | | kind/refactor | | 506 | Add `tea issue edit` | open | Norwin | v0.10.0 | 2022-09-26 23:48 | kind/feature | | 473 | WIP: tea clone: set upstream | open | Norwin | | 2022-03-19 12:30 | kind/enhancement | | | remote for mirrors | | | | | | | 395 | Drop features to reduce | open | Norwin | | 2021-09-15 15:37 | kind/breaking | | | friction on first use | | | | | kind/proposal | | 330 | WIP: print more issue details | open | Norwin | | 2022-09-13 20:09 | kind/enhancement | | | | | | | | status/wip | +-------+--------------------------------+-------+--------+-----------+------------------+--------------------------------+ ``` will be: ```json [ { "index": 514, "title": "Find DefaultPRHead based on branch and SHA", "state": "open", "author": 6543, "milestone": "v0.10.0", "updated": "2022-09-26T22:42:43Z", "labels": "kind/enhancement" }, { "index": 513, "title": "Add "json" as output type", "state": "open", "author": 6543, "milestone": "v0.10.0", "updated": "2022-09-26T21:58:03Z", "labels": "kind/enhancement" }, { "index": 511, "title": "WIP: `tea issue create`: support issue templates & forms", "state": "open", "author": "Norwin", "milestone": "v0.10.0", "updated": "2022-09-21T17:01:22Z", "labels": "kind/feature" }, { "index": 509, "title": "WIP: Add Allow Maintainer Edits", "state": "open", "author": 6543, "milestone": "v0.10.0", "updated": "2022-09-26T22:12:14Z", "labels": "kind/enhancement" }, { "index": 507, "title": "WIP: improve sshcert authentication", "state": "open", "author": "Norwin", "milestone": "v0.10.0", "updated": "2022-09-26T20:34:11Z", "labels": "kind/enhancement kind/refactor" }, { "index": 506, "title": "Add `tea issue edit`", "state": "open", "author": "Norwin", "milestone": "v0.10.0", "updated": "2022-09-26T21:48:32Z", "labels": "kind/feature" }, { "index": 473, "title": "WIP: tea clone: set upstream remote for mirrors", "state": "open", "author": "Norwin", "milestone": "", "updated": "2022-03-19T11:30:45Z", "labels": "kind/enhancement" }, { "index": 395, "title": "Drop features to reduce friction on first use", "state": "open", "author": "Norwin", "milestone": "", "updated": "2021-09-15T13:37:51Z", "labels": "kind/breaking kind/proposal" }, { "index": 330, "title": "WIP: print more issue details", "state": "open", "author": "Norwin", "milestone": "", "updated": "2022-09-13T18:09:56Z", "labels": "kind/enhancement status/wip" } ] ``` </details>
6543 added this to the v0.10.0 milestone 2 months ago
6543 added the kind/enhancement label 2 months ago
6543 added 1 commit 2 months ago
continuous-integration/drone/pr Build is failing Details
0fc49b5ae7
Add "json" as output type
6543 added 1 commit 2 months ago
continuous-integration/drone/pr Build was killed Details
5013335275
add json to help text and exit with code 1
6543 added 1 commit 2 months ago
continuous-integration/drone/pr Build is passing Details
f2d38d9339
fix lint
6543 added 1 commit 2 months ago
continuous-integration/drone/pr Build is passing Details
6e632dc80c
Add unit test for print table funcs
noerw reviewed 2 months ago
noerw left a comment
Collaborator

I think the output flag needs to have json added as well

I think the output flag needs to have `json` added as well
noerw added 1 commit 2 months ago
continuous-integration/drone/pr Build is passing Details
b415ff13e2
add json to help of output flag
noerw approved these changes 2 months ago
strk approved these changes 2 months ago
strk left a comment
Collaborator

Thanks!

Thanks!
6543 merged commit a37377d181 into main 2 months ago
6543 referenced this issue from a commit 2 months ago
6543 deleted branch support_json_output 2 months ago

Reviewers

noerw approved these changes 2 months ago
strk approved these changes 2 months ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as a37377d181.
Sign in to join this conversation.
Loading…
There is no content yet.