I use gh command to list and print all issues to a CSV file, but I can't get the all assignees also.
The complete command I use:
gh issue list --limit 1000 --state all | tr '\t' ',' > issues.csv
I use gh command to list and print all issues to a CSV file, but I can't get the all assignees also.
The complete command I use:
gh issue list --limit 1000 --state all | tr '\t' ',' > issues.csv
Since the default output contains comma-separated labels and one issue can have more than one label, your approach (converting all tabs to commas) can result in a malformed CSV output. To fix just that, you could use a CSV-aware tool such as xsv:
This properly quotes fields containing a comma.
Now, to get assignees as well, you can use the
--jsonflag that lets you select which fields you want in the response, and--jqto massage the JSON response into CSV format.For example, to get number, state, title, timestamp of the last update, labels, and assignees: