For a report I needed to retrieve all the issues I commented on from GitHub, and then I needed it in a comma-delimited format.
The parts:
A quick and dirty way for one time use:
- GitHub CLI command: (Docs)
- VS Code Extension JSON to CSV by Khaer Ansori
- Google Sheets
The steps
Use the gh
command
Find 50 issues I commented on in the Gutenberg Repo sorted by creation date, in json format, show the fields “url” and “title”. Copy in the terminal window in VS Code.
gh search issues --commenter bph --repo 'WordPress/gutenberg' --sort 'created' --limit 50 --json 'url','title'
Copy JSON output
I copied the console output into a new file issues.json and saved it as “issues.json”
Use convert JSON to CSV
Then I used from the Command palette (F1 by default) the command “Convert JSON to CSV”. Saved as a new file: “issues.csv”
Import to Google Sheet
Lastly I imported the issues.csv file into a new Google Sheet.
Leave a Reply