This script saves GitHub issues in TSV format
The script has two software dependancies:
- GitHub CLI for querying GitHub API
jq
for transforming the output of the above to TSV format
There are multiple ways to install these tools. If you're using Homebrew on macOS, it's as simple as running the code snippet below:
brew install jq
brew install gh
- Download the script
- Make it executable
chmod +x issues2tsv.sh
- Run it in the cloned repository
gh repo clone <organization>/<name>
# cd to the cloned repository
./issues2tsv.sh
The following issue attributes are included in the TSV by default: number, title, assignees, state, url.
These are the available issue attributes, the script can be modified to include any of the following:
assignees
author
body
closed
closedAt
comments
createdAt
id
labels
milestone
number
projectCards
reactionGroups
state
title
updatedAt
url
The script outputs a TSV file named issues-<date>.tsv
with content formatted like this:
number title assignees state url
<issue_number> <issue_title> <assigned_users> <issue_state> <issue_url>
<issue_number> <issue_title> <assigned_users> <issue_state> <issue_url>
<issue_number> <issue_title> <assigned_users> <issue_state> <issue_url>
Cool. With current
gh 2.37.0 (2023-10-17)
on Linux I was able to use the--jq
option instead of installing and piping tojq