Skip to content

Instantly share code, notes, and snippets.

@roundrop
Created February 24, 2017 11:27
Show Gist options
  • Save roundrop/d10b21c165f2116ca91e351a8650a1d8 to your computer and use it in GitHub Desktop.
Save roundrop/d10b21c165f2116ca91e351a8650a1d8 to your computer and use it in GitHub Desktop.
Save GitHub Issues by curl
#!/usr/bin/env bash
USER=user_name
PERSONAL_TOKEN=*************************************************
USER_OR_ORG=user_name_or_organization_name
REPO=repo_name
# can get per max 100 issues
curl -u $USER:$PERSONAL_TOKEN -o issues_1.json -# https://api.github.com/repos/$USER_OR_ORG/$REPO/issues?state=all\&page=1\&per_page=100
curl -u $USER:$PERSONAL_TOKEN -o issues_2.json -# https://api.github.com/repos/$USER_OR_ORG/$REPO/issues?state=all\&page=2\&per_page=100
curl -u $USER:$PERSONAL_TOKEN -o issues_3.json -# https://api.github.com/repos/$USER_OR_ORG/$REPO/issues?state=all\&page=3\&per_page=100
# :
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment