gh extension install KOBA789/gh-sql
SELECT
itemsDELETE
itemsUPDATE
item fields- You can not modify
Title
,Assignees
,Labels
,Milestone
, orRepository
- You can not modify
USAGE:
gh-sql [OPTIONS] <OWNER> <PROJECT_NUMBER>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-e, --execute <execute> SQL statement to execute
-o, --output <output> "table", "json" or these initial [default: table]
ARGS:
<OWNER>
<PROJECT_NUMBER>
-oj
: output as json-e
: non-interactive mode
gh sql YOUR_NAME YOUR_PROJECT_NUMBER -oj -e 'select * from items;'
Of course, you can also pipe it to jq
.
gh sql YOUR_NAME YOUR_PROJECT_NUMBER -oj -e 'select * from items where Repository is not null;' | \
jq -r '"- " + .Repository + "#" + (.Issue | tostring)'