Kynan Ware
9331ee8215
Add godoc comments to exported symbols in pkg/cmdutil
...
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 16:01:52 -07:00
Benjamin Levesque
a9cc63b8a3
refactor without VisitAll
2025-08-31 18:09:46 +02:00
Benjamin Levesque
45ecc5ece9
introduce AddJSONFlagsWithoutShorthand
2025-08-31 17:56:52 +02:00
Benjamin Levesque
faa0e2c26b
flag duplicate check
2025-08-20 20:02:00 +02:00
William Martin
0ead3398a7
Bump golang ci lint to work with go 1.24
2025-01-21 17:55:39 +01:00
Babak K. Shandiz
506378cc21
Add help:json-fields annotation
...
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-05-06 17:54:59 +01:00
w1mvy
9dd5805f9c
Add json export flags to variable list command ( #8516 )
2024-01-17 10:09:09 -08:00
Heath Stewart
0cf5d22ead
Support template, jq flags with standard format flag ( #7832 )
...
* Use standard JSON flags for project command
Deprecates the --format flag and adds the standard JSON flags to properly filter, template, and write JSON.
* Add format flags cmdutil
Resolves PR feedback
* Remove unnecessary fields from JSON format flags
* Add standard format help to remaining commands
* Add JSON format regression tests
Also fixed a number of `project` commands that didn't format the right object as JSON.
* Resolve PR feedback
2024-01-09 09:46:39 -08:00
Martijn Pieters
530002ee7a
Pretty-print JSON results of jq filtering ( #7236 )
...
When connected to a TTY, tell the jq formatter to indent the output, and
enable colorization of the output if the terminal supports it.
Co-authored-by: Mislav Marohnić <mislav@github.com>
2023-04-25 13:27:17 +00:00
Sam Coe
dbc2f05124
Update go-gh to v2 ( #7299 )
...
* Update go-gh
* Update code for go-gh v2
2023-04-16 15:34:23 +10:00
Heath Stewart
cd63b0eac5
Add more help to "template" flags
...
Resolves #6089
2022-09-17 23:12:48 -07:00
Sam Coe
6a8deb1f5a
Integrate latest go-gh packages ( #6084 )
2022-08-18 09:04:13 +03:00
rsteube
d794a929da
Fix stack overflow in AddJSONFlags ( #4614 )
...
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-10-27 14:56:59 +02:00
Mislav Marohnić
83a08aa3ba
Remove unnecessary pointers to Go maps
2021-10-25 17:20:12 +02:00
Mislav Marohnić
11fbb60ae7
Rename the module to "github.com/cli/cli/v2"
2021-08-25 12:41:30 +02:00
Heath Stewart
e2973453b5
Add helper template functions for rendering tables ( #3519 )
...
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-08-23 21:00:25 +02:00
Mislav Marohnić
4d7625c8a0
Allow shell-completing multiple --json fields separated by commas
2021-07-21 16:12:38 +02:00
Mislav Marohnić
301a35eedc
Merge pull request #3621 from cli/export-data
...
Push data serialization concern into Exporter
2021-05-17 13:43:00 +02:00
Mislav Marohnić
b09c1f7a6f
Add shell completion for the --json flag
2021-05-12 17:35:17 +02:00
Mislav Marohnić
5f0301c990
Have Exporter.Write automatically call ExportData on given data structure
2021-05-12 17:05:15 +02:00
Mislav Marohnić
654bd29ca0
Disallow unsupported values for --json flag
2021-04-14 19:58:58 +02:00
Mislav Marohnić
625505dcfb
Fix assigning null Exporter
2021-04-14 19:11:08 +02:00
Mislav Marohnić
3ad41e3e65
Change JSON Exporter to an interface
2021-04-14 18:15:52 +02:00
Mislav Marohnić
abe452bb19
Add --json export flag for issues and pull requests
...
The `--json` flag accepts a list of GraphQL fields to query for and
output in JSON format. To get the list of available flags, run the
command with a blank value for `--json`. Additional `--jq` and
`--template` flags are available just like in `gh api`.
2021-04-13 20:29:31 +02:00