Skip to content

Instantly share code, notes, and snippets.

@bonelifer
Forked from oelna/dump_github_issues.sh
Created September 4, 2020 02:43
Show Gist options
  • Save bonelifer/1fc33892d1a95ee734126e5ba9edd12a to your computer and use it in GitHub Desktop.
Save bonelifer/1fc33892d1a95ee734126e5ba9edd12a to your computer and use it in GitHub Desktop.
Export Github issues from the command line
#!/bin/bash
echo "Please enter your Github username"
read username
echo "Please enter your Github password"
read -s password
echo "What is the Github repo you'd like to download issues from?"
echo "Format is user/repo"
read repo
filename=$(echo "$repo.json" | tr / -)
echo "Dumping $repo to $filename ..."
echo
echo
# remove -u if not private
curl -u "$username:$password" "https://api.github.com/repos/$repo/issues?per_page=1000&state=all" > $filename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment