I am trying to extract issues from git issues. Expecting a csv with data in selected columns ( even mutilple values in each cell accepted )
ps:"labels" contains more than one categories .
gh issue list --limit 10000 --state all --json number,title,assignees,state,labels,url | jq -r '["number","title","assignees","state","labels","url"], (.[] | [.number, .title, (.assignees | if .|length==0 then "Unassigned" elif .|length>1 then map(.login)|join(",") else .[].login end) , .state, .labels, .url]) | @csv' > issues-$(date '+%Y-%m-%d').csv
getting
jq: error (at :1): object ({"id":"MDU6...) is not valid in a csv row